diff options
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 ed350de7f..fde08490a 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -444,7 +444,7 @@ def count_nonzero(a, axis=None): counts = np.apply_along_axis(multiarray.count_nonzero, axis[0], a) if axis.size == 1: - return counts + return counts.astype(np.intp, copy=False) else: # for subsequent axis numbers, that number decreases # by one in this new 'counts' array if it was larger |