Skip to content

Commit de8aee4

Browse files
devyanic11rossbarseberg
authored
DOC: Update numpy.any example (numpy#26235)
* Update docstring example to give different values along axis=0 and axis=1 --------- Co-authored-by: Ross Barnowski <[email protected]> Co-authored-by: Sebastian Berg <[email protected]>
1 parent 6e8f6ca commit de8aee4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

numpy/_core/fromnumeric.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,8 +2469,9 @@ def any(a, axis=None, out=None, keepdims=np._NoValue, *, where=np._NoValue):
24692469
>>> np.any([[True, False], [True, True]])
24702470
True
24712471
2472-
>>> np.any([[True, False], [False, False]], axis=0)
2473-
array([ True, False])
2472+
>>> np.any([[True, False, True ],
2473+
... [False, False, False]], axis=0)
2474+
array([ True, False, True])
24742475
24752476
>>> np.any([-1, 0, 5])
24762477
True

0 commit comments

Comments
 (0)