summaryrefslogtreecommitdiff
path: root/tools/py3tool.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-13 11:17:54 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-13 11:17:54 -0600
commit54ca3f28ada715a0c84686f74f3b5a7ba4aa2c95 (patch)
tree7ea7a1632467f8d6e2917b4982809e02facf2d79 /tools/py3tool.py
parent688bc60658b391524c6b641e0a5e5ecd73322d02 (diff)
downloadnumpy-54ca3f28ada715a0c84686f74f3b5a7ba4aa2c95.tar.gz
2to3: Apply nonzero fixer.
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 #3073.
Diffstat (limited to 'tools/py3tool.py')
-rwxr-xr-xtools/py3tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/py3tool.py b/tools/py3tool.py
index 0caf6ebeb..9abc82985 100755
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -73,7 +73,7 @@ FIXES_TO_SKIP = [
'methodattrs',
'ne',
# 'next',
-# 'nonzero',
+ 'nonzero',
'numliterals',
'operator',
'paren',