Skip to content

TST: __array_ufunc__ cannot be overridden on axis, etc. #9107

Closed

Description

@mhvk

While looking at our __array_ufunc__ implementation, I noticed that it looks on all args and any kwargs['out'] entry. This is OK for the regular ufunc.__call__, but for the other methods, it means that if you pass in, e.g., an axis as a positional argument with something that overrides __array_ufunc__, it is counted, and you get your override. This is probably not intended, if only because it means positional and keyword arguments are treated differently...

Unlike the other issues, probably a bit less critical, but still, should be fixed.

Activity

  1. changed the title [-]BUG __array_ufunc__ can be overridden on axis, etc.[/-] [+]TST: __array_ufunc__ cannot be overridden on axis, etc.[/+] on Mar 23, 2021
  2. seberg commented on Mar 23, 2021

    @seberg
    Member

    Changing title/tag, since gh-15271 will fix this, but new tests for it might be good.

  3. mhvk commented on Mar 23, 2021

    @mhvk
    ContributorAuthor

    Ah, yes, I vaguely seemed to recall there was an issue open for it - and then it turns out to have been mine! I think it is definitely good to have it fixed!

  4. mhvk commented on Jun 26, 2021

    @mhvk
    ContributorAuthor

    fixed by #15271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions