NumPy: Sorting Arrays Using msort()

It is used to return a copy of an array sorted along the first axis. It is same as numpy.sort() along the axis=0.

Syntax:

numpy.msort(a)

Example:

a= np.array([30,10,20])
np.msort(a)

Output:

array([10, 20, 30])
Tue, 09/07/2021 - 19:39

Authored by

Devanshi, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.