summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 202802e2c..af2a5298d 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -1795,6 +1795,11 @@ def nonzero(a):
Equivalent ndarray method.
count_nonzero :
Counts the number of non-zero elements in the input array.
+
+ Notes
+ -----
+ To obtain the non-zero values, it is recommended to use ``x[x.astype(bool)]``
+ which will correctly handle 0-d arrays.
Examples
--------