Skip to content

BUG: Power fast-paths have wrong and confusing promotion logic #27082

@seberg

Description

@seberg

The power fast-paths use checks like scalar == 2 to call square. Which was more correct before NEP 50 (but I am sure there were bugs also before), but less so after, if you pass in something like np.int64(2) and the array is, say int32.

That logic is a bit confusing and diverges it from the ufunc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions