diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-10-10 23:29:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 23:29:06 -0700 |
commit | e64699dcaca9eb0dd97deabae01ffc2884cacbb0 (patch) | |
tree | 3eb305b2a44907df99385704cf6375901d564156 /numpy/core/numeric.py | |
parent | bb5d666e84e2eb294543a67c6143d7e9124d1c73 (diff) | |
parent | 6fbbadb676dfa7cee56be3bd17b92bde661f8869 (diff) | |
download | numpy-e64699dcaca9eb0dd97deabae01ffc2884cacbb0.tar.gz |
Merge pull request #9718 from hemildesai/deprecate_truth_testing_on_empty_arrays
DEP: Deprecate truth testing on empty arrays
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index ce17a1900..5b10361fe 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -406,7 +406,7 @@ def count_nonzero(a, axis=None): array([2, 3]) """ - if axis is None or axis == (): + if axis is None or (isinstance(axis, tuple) and axis == ()): return multiarray.count_nonzero(a) a = asanyarray(a) |