-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: MaskedArray ignores __array_priority__ #5230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Python 2.6 compatibility | ||
if not hasattr(TestCase, 'assertIsInstance'): | ||
def assertIsInstance(self, obj, cls): | ||
self.assertTrue(isinstance(obj, cls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing )
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes universal test failures.
@abalkin Could you finish this up? |
self.__doc__ = getattr(mbfunc, "__doc__", str(mbfunc)) | ||
self.__name__ = getattr(mbfunc, "__name__", str(mbfunc)) | ||
ufunc_domain[mbfunc] = None | ||
ufunc_fills[mbfunc] = (fillx, filly) | ||
|
||
def __get__(self, obj, type=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly confused why this is being done. It makes this a descriptor, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is this what allows you to directly define __add__
below?
@abalkin - pointed to this by @charris -- this seems a good approach, and is probably the safest one can be. In a slightly larger picture, though, I wonder if one isn't duplicating more of the
Anyway, this mostly as a curiosity; I fear removing the methods would imply a great deal more work, and possibly a lot of rewriting of |
@mhvk - I agree that |
@abalkin - from my work on If you want to have some sense of what a |
Is the suggestion that I can close this in favor of a |
I believe that #5864 also addresses the issues here in a different way.
|
Specifically, njsmith@c3c819a |
Currently there are two different mechanisms used to handle the interaction
|
fixes: #5227
This patch partially fixes the issue (I only covered addition, subtraction and multiplication). If you agree that this is the right approach - I will add remaining operations.