Skip to content

BUG: ensure structured ndarray.__eq__,__ne__ defer when appropriate. - #9167

Merged
charris merged 1 commit into
numpy:masterfrom
mhvk:ndarray__eq__override
May 24, 2017
Merged

charris merged 1 commit into
numpy:masterfrom
mhvk:ndarray__eq__override

Conversation

@mhvk

@mhvk mhvk commented May 23, 2017

Copy link
Copy Markdown
Contributor

This solves the case where other is an object that defines a higher __array_priority__ or __array_ufunc__ = None, but not yet the case where it defines its own implementation of __array_ufunc__. See #9153 for details.

Comment thread numpy/core/src/multiarray/arrayobject.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need this in NE too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geez, I'm not being very bright today! And that only shows that my test is wrong too. Will fix!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did the test change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial test did not even use a structured array for the comparison, so it passed trivially! (I did check that the current test fails on master)

This solves the case where `other` is an object that defines a
higher `__array_priority__` or `__array_ufunc__ = None`, but not
yet the case where it defines its own implementation of
`__array_ufunc__`.
@mhvk
mhvk force-pushed the ndarray__eq__override branch from 6c7bd01 to 48b4aca Compare May 24, 2017 00:44
@charris charris added this to the 1.13.0 release milestone May 24, 2017
@charris
charris merged commit 1dd67b8 into numpy:master May 24, 2017
@charris

charris commented May 24, 2017

Copy link
Copy Markdown
Member

LGTM, thanks Marten.

@mhvk
mhvk deleted the ndarray__eq__override branch May 25, 2017 02:27
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants