VOOZH about

URL: https://www.geeksforgeeks.org/python/numpy-sort-in-python/

⇱ numpy.sort() in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

numpy.sort() in Python

Last Updated : 29 Nov, 2018
numpy.sort() : This function returns a sorted copy of an array. Parameters :
arr : Array to be sorted. axis : Axis along which we need array to be started. order : This argument specifies which fields to compare first. kind : [‘quicksort’{default}, ‘mergesort’, ‘heapsort’]Sorting algorithm.
Return :
Sorted Array
Output :
Along first axis : 
 [[10 1]
 [12 15]]

Along first axis : 
 [[10 15]
 [ 1 12]]

Along none axis : 
 [ 1 10 12 15]
Comment