Skip to content

Some reduction operators have double signatures #61486

@heitorschueroff

Description

@heitorschueroff

Some reduction operators have two signatures, one that takes a dim and keepdim parameter to reduce along one or more dimensions and another that does not which reduces the flattened tensor. We should update these operators to only have one signature with an optional dim=None parameter which is more compatible with the Python Array API Standard.

In particular, the Python Array API Standard specifies the following types for axis (dim) parameter:
axis : Optional[ Union[ int, Tuple[ int, … ] ] ].

Operators with double signature to update

cc @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi @heitorschueroff

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: deprecationmodule: python array apiIssues related to the Python Array APImodule: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions