forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Python 3 the `__nonzero__` class method is replaced by `__bool__`. This only affects the MaskedArray class in numpy/oldnumeric/ma.py file and the simplest solution is to provide both methods. I have my doubts that the fixed up Python 3 version was correct or even tested, but I think the current solution should work for as long as oldnumeric stays in numpy. Closes numpy#3073.
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ | |
'methodattrs', | ||
'ne', | ||
# 'next', | ||
# 'nonzero', | ||
'nonzero', | ||
'numliterals', | ||
'operator', | ||
'paren', | ||
|