Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b99935e

Browse files
shreya-singh-techmelissawm
authored andcommitted
DOC: Add examples to msort in lib/function_base.py
1 parent 5f94eb8 commit b99935e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

numpy/lib/function_base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3666,6 +3666,14 @@ def msort(a):
36663666
-----
36673667
``np.msort(a)`` is equivalent to ``np.sort(a, axis=0)``.
36683668
3669+
Examples
3670+
--------
3671+
>>> a = np.array([[1,4],[3,1]])
3672+
>>> np.msort(a) # sort along the first axis
3673+
array([[1, 1],
3674+
[3, 4]])
3675+
3676+
36693677
"""
36703678
b = array(a, subok=True, copy=True)
36713679
b.sort(0)

0 commit comments

Comments
 (0)