Skip to content

Commit b87ff77

Browse files
authored
Merge pull request numpy#28090 from samir539/fix_select_documentation
DOC:Fixed docstring with example use of np.select
2 parents a39a546 + 6775ab5 commit b87ff77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/lib/_function_base_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,9 @@ def select(condlist, choicelist, default=0):
823823
824824
>>> x = np.arange(6)
825825
>>> condlist = [x<3, x>3]
826-
>>> choicelist = [x, x**2]
826+
>>> choicelist = [-x, x**2]
827827
>>> np.select(condlist, choicelist, 42)
828-
array([ 0, 1, 2, 42, 16, 25])
828+
array([ 0, -1, -2, 42, 16, 25])
829829
830830
When multiple conditions are satisfied, the first one encountered in
831831
`condlist` is used.

0 commit comments

Comments
 (0)