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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 973ba7b3a..4309277ad 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -1514,7 +1514,8 @@ def nonzero(a):
array([[1, 0, 0],
[0, 2, 0],
[1, 1, 0]])
- >>> (array([0, 1, 2, 2], dtype=int64), array([0, 1, 0, 1], dtype=int64))
+ >>> np.nonzero(x)
+ (array([0, 1, 2, 2], dtype=int64), array([0, 1, 0, 1], dtype=int64))
>>> x[np.nonzero(x)]
array([ 1., 1., 1.])