排序函数(sort、sorted、argsort、lexsort、partition、argpartition、searchsorted)

list.sort

通过对提供的数组进行就地修改来返回已排序的数组。因此,元素数组将被修改。

numpy.sort(ndarray.sort与之类似)

使用numpy.sort函数可以对数组进行排序,并返回排序好的数组。

  • 语法

    numpy.sort(a, aixs=-1, kind=None, order=None)
    
  • 参数

    numpy.sort(a, axis=1, kind='quicksort', order=None)
    Parameters:	a : array_like
    				Array to be sorted.
    			axis : int or None, optional
    				Axis along which to sort. If None, the array is flattened 
    				before sorting. The default is 1, which sorts along the last
    				 axis.
    			kind : {‘quicksort’, ‘mergesort’, ‘heapsort’}, optional
    				Sorting algorithm. Default is ‘quicksort’.
    			order : str or list of str, optional
    				When a is an array with fields defined, this argument
    				specifies which fields to compare first, second, etc. A 
    				single field can be specified as a string, and not all 
    				fields need be specified, but unspecified fields will still 
    				be used, in the order in which they come up in the dtype, to 
    				break ties.
    Returns:	sorted_array : ndarray
    			Array of the same type and shape as a.
    
    
    • a 要排序的数组
    • axis 按什么轴进行排序,默认按最后一个轴进行排序。
    • kind 排序方法,‘quicksort’为快排,‘mergesort’为混排,‘heapsort’为堆排,默认是快速排序
    • order 当数组定义了字段属性时,可以按照某个属性进行排序。
  • 例子

    import numpy as np
    # 创建一个一维数组
    x1 = np.array([1,8,2,4])
    x1
    '''
    一维数组:
    array([1, 8, 2, 4])
    '''
    # 排序
    np.sort(x1)
    '''
    输出:
    array([1, 2, 4, 8])
    '''
    
    # 创建一个二维数组
    x2 = np.array([[1,8,2,4],[4,5,1,3]])
    x2
    '''
    二维数组:
    array([[1, 8, 2, 4],
           [4, 5, 1, 3]])
    '''
    # 默认按最后一个轴排序,这里按行排序
    np.sort(x2)
    '''
    输出:
    array([[1, 2, 4, 8],
           [1, 3, 4, 5]])
    '''
    # 轴设为0,即按列排序
    np.sort(x2,axis=0)
    '''
    输出:
    array([[1, 5, 1, 3],
           [4, 8, 2, 4]])
    '''
    

    在这里插入图片描述

    按照字段属性进行排序,需要用到order参数。

    import numpy as np
    # 这是一个名字、身高、年龄的数组
    # 先给各字段配置属性类型
    dtype = [('Name', 'S10'), ('Height', float), ('Age', int)]
    # 各字段值
    values = [('Li', 1.8, 41), ('Wang', 1.9, 38),('Duan', 1.7, 38)]
    # 创建数组
    a = np.array(values, dtype=dtype)
    a
    '''
    数组:
    array([(b'Li', 1.8, 41), (b'Wang', 1.9, 38), (b'Duan', 1.7, 38)],
          dtype=[('Name', 'S10'), ('Height', '<f8'), ('Age', '<i4')])
    '''
    # 按照属性Height进行排序,此时参数为字符串          
    np.sort(a, order='Height')     
    '''
    输出:
    array([(b'Duan', 1.7, 38), (b'Li', 1.8, 41), (b'Wang', 1.9, 38)],
          dtype=[('Name', 'S10'), ('Height', '<f8'), ('Age', '<i4')])
    '''
    # 先按照属性Age排序,如果Age相等,再按照Height排序,此时参数为列表     
    np.sort(a, order=['Age', 'Height']) 
    '''
    输出:
    array([(b'Duan', 1.7, 38), (b'Wang', 1.9, 38), (b'Li', 1.8, 41)],
          dtype=[('Name', 'S10'), ('Height', '<f8'), ('Age', '<i4')])
    '''
    

    在这里插入图片描述
    在这里插入图片描述

sorted

对所有可迭代的对象进行排序操作。返回排序后的数组,而不修改原始数组。

  • 语法

    sorted(iterable, cmp=None, key=None, reverse=False)
    
  • 参数说明

    • iterable 可迭代对象
    • cmp 比较的函数,这个具有两个参数,参数的值都是从可迭代对象中取出,此函数必须遵守的规则为,大于则返回1,小于则返回-1,等于则返回0.
    • key 主要是用来进行比较的元素,只有一个参数,具体的函数的参数就是取自于可迭代对象中,指定可迭代对象中的一个元素来进行排序。
    • reverse 排序规则,reverse=True降序,reverse=False升序(默认)。
  • 例子
    在这里插入图片描述

sort函数与sorted函数最大的区别是:

  • sort函数对已存在的列表进行操作,调用其没有返回值。
    在这里插入图片描述
  • 内置函数sorted方法返回一个新的list,不在原来的list上进行操作,调用其返回一个排好序的list。
    在这里插入图片描述

numpy.argsort

numpy中的argsort函数用于将数组排序后,返回数组元素从小到大依次排序的所有元素索引。返回排序数组的索引,而不是数组元素的索引。

  • 语法

    numpy.argsort(a, axis=-1, kind=None, order=None)
    
  • 参数

    numpy.argsort(a, axis=1, kind='quicksort', order=None)
    Parameters:	a : array_like
    				Array to sort.
    			axis : int or None, optional
    				Axis along which to sort. The default is 1 (the last axis).
    				If None, the flattened array is used.
    			kind : {‘quicksort’, ‘mergesort’, ‘heapsort’}, optional
    				Sorting algorithm.
    			order : str or list of str, optional
    				When a is an array with fields defined, this argument
    				specifies which fields to compare first, second, etc. A
    				single field can be specified as a string, and not all fields
    				need be specified, but unspecified fields will still be used,
    				in the order in which they come up in the dtype, to break
    				ties.
    Returns:	index_array : ndarray, int
    				Array of indices that sort a along the specified axis. If a
    				is one-dimensional, a[index_array] yields a sorted a.
    
    
    • a 要排序的数组
    • axis 数组排序时的基准,按什么轴进行排序,axis=0按行排列,axis=1按列排列,默认按最后一个轴进行排序
    • kind 排序方法,默认是快速排序
    • order 当数组定义了字段属性时,可以按照某个属性进行排序
  • 例子

    import numpy as np
    # 创建一维数组
    x = np.array([3, 1, 2])
    '''
    数组:
    array([3, 1, 2])
    '''
    # 获取排序后的索引
    np.argsort(x)
    '''
    输出:
    array([1, 2, 0], dtype=int64)
    '''
    
    # 创建二维数组
    x2 = np.array([[0, 3], [2, 2]])
    '''
    数组:
    array([[0, 3],
           [2, 2]])
    '''
    # 默认按照最后一个轴进行排序,即行排序
    # 获取排序后的索引
    np.argsort(x2)
    '''
    输出:
    array([[0, 1],
           [0, 1]], dtype=int64)
    '''
    

    在这里插入图片描述

    按字段属性进行排序,并获取索引。

    # 先给各字段配置属性类型
    dtype = [('name', str), ('age', int)]
    # 值
    values = [('Anna', 28), ('Bob', 27),('Brown',21)]
    # 创建数组
    x = np.array(values, dtype=dtype)
    x
    '''
    数组:
    array([('', 28), ('', 27), ('', 21)],
          dtype=[('name', '<U'), ('age', '<i4')])
    '''
    # 先按照属性age排序,如果age相等,再按照name排序
    np.argsort(x,order=['name','age'])
    '''
    输出:
    array([2, 1, 0], dtype=int64)
    '''
    

    在这里插入图片描述

    >>>list1=[4,2,5,7,3]
    >>>a=np.array(list1)
    >>>a
    array([4, 2, 5, 7, 3])
    >>>b=np.argsort(a)
    >>>b
    array([1, 4, 0, 2, 3], dtype=int64)
    # 列表b的元素表示的是原列表a中的元素的索引,5各元素的索引分别为0-4
    # 返回的结果可以这样解读:
    # 	b[0]=1,表示原列表a的最小元素的索引为1,即原列表a中的第2个元素为最小值
    #	b[1]=4,表示原列表a的第二小元素的索引为4,即原列表a中的第5个元素为第二小元素
    #	...
    #	b[4]=3,表示原列表a中的最大元素的索引为3,即原列表a中的第4个元素为最大值
    >>>list2=[[3, 2],[5, 7]]
    >>>c=np.array(list2)
    >>>c
    array([[3, 2],[5, 7]])
    >>>np.argsort(c, axis=1)
    array([[1, 0],[0, 1]],dtype=int64)
    # axis=1,表明按照行进行排序,即是对[3, 2]进行排序,所以得到索引为[1, 0],其他同理
    >>>np.argsort(c, axis=0)
    array([[0, 1],[0, 1]],dtype=int64)
    # axis=0,表明按照列进行排序,即是对[3, 5]进行排序,所以得到索引为[0, 1],其他同理
    >>> x = np.array([(1, 0), (0, 1)], dtype=[('x', '<i4'), ('y', '<i4')])
    >>> x
    array([(1, 0), (0, 1)], dtype=[('x', '<i4'), ('y', '<i4')])
    >>> np.argsort(x, order=('x','y'))
    # 先按照x进行比较,再按照y进行比较,即是先比较1与0
    array([1, 0])
    >>> np.argsort(x, order=('y','x'))
    # 先按照y进行比较,再按照x进行比较,即是先比较0与1
    array([0, 1])
    
    a = np.array([[1,2,1,5],[5,3,6,9],[6,2,9,5]])
    #按照第1行对列进行排序
    a1 = a.T[a[0].argsort()].T
    #或者
    a2 = a[:, a[0].argsort()]
    #按照最后1行对列进行排序
    a3 = a.T[a[-1].argsort()].T
    #或者
    a4 = a[:, a[-1].argsort()]
    #按照第1列对行排序
    a5 = a[a[:, 0].argsort()] 
    #按照最后1列对行排序
    a6 = a[a[:, -1].argsort()] 
    

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

numpy.lexsort

numpy.lexsort函数用于按照多个条件(键)进行排序,返回排序后索引。使用键序列执行间接稳定排序,用于使用涉及多个数组的多个排序键进行排序。
给定多个排序键(可以将其解释为电子表格中的列),lexsort返回一个整数索引数组,该数组描述按多个列排序的顺序。序列中的最后一个键用于主排序顺序,倒数第二个键用于辅助排序顺序,依此类推。keys参数必须是可以转换为相同形状的数组的对象序列。如果为keys参数提供了2D数组,则将其行解释为排序键,并根据最后一行,倒数第二行等进行排序。

  • 语法

    numpy.lexsort(keys, axis=-1)
    
  • 参数

    • keys 序列或元组,要排序的不同的列
    • axis 沿指定轴进行排序
  • 例子

    import numpy as np
    # 英语成绩
    eng = [90,85,95,80]
    # 数学成绩
    math = [80,95,90,85]
    # 总成绩
    total = [170,170,185,165]
    # 排序,获取索引
    np.lexsort((eng,math,total))
    '''
    先按总成绩total进行排序,
    再按数学成绩math进行排序,
    最后按英语成绩进行排序。
    可以看到total里有两个170,
    这时候就按下一级math排序,
    最后获取排序后的索引
    输出:
    array([3, 0, 1, 2], dtype=int64)
    '''
    # 也可以直接传入数组
    score = np.array([[90,85,95,80],[80,95,90,85],[170,170,185,165]])
    np.lexsort(score)
    '''
    输出:
    array([3, 0, 1, 2], dtype=int64)
    '''
    

    在这里插入图片描述

    >>> a=[1,5,1,4,3,4,4]
    >>> b=[9,4,0,4,0,2,1]
    >>> np.lexsort((b,a))
    # b在前,a在后,即是先按照a的元素进行比较
    # 如a中的最小值为两个1,其索引分别为0,2,再计较b中相应索引上的值,即9,0
    # 对应的最小应是:1,0,而其对应的索引为2,所以排序后返回的结果第一个值为索引2
    # 下一个最小应是:1,9,而其对应的索引为0,所以排序后返回的结果第一个值为索引0
    # 以此类推...
    array([2, 0, 4, 6, 5, 3, 1], dtype=int64)
    >>> np.lexsort((a,b))
    # a在前,b在后,即是先按照b的元素进行比较
    # 如b中的最小值为两个0,其索引分别为0,4,再计较a中相应索引上的值,即1,3
    # 对应的最小应是:0,1,而其对应的索引为2,所以排序后返回的结果第一个值为索引2
    # 下一个最小应是:0,3,而其对应的索引为4,所以排序后返回的结果第一个值为索引4
    # 以此类推...
    array([2, 4, 6, 5, 3, 1, 0], dtype=int64)
    >>> c=[[1,5,1,4,3,4,4],[9,4,0,4,0,2,1]]
    >>> c
    [[1, 5, 1, 4, 3, 4, 4], [9, 4, 0, 4, 0, 2, 1]]
    >>> np.lexsort(c)
    # 此种情况与先b后a的情况一致
    array([2, 4, 6, 5, 3, 1, 0], dtype=int64)
    
    

实现对数组或列表按照某一行或列进行排序。按照一个键值序列提供一个间接稳定的排序。

lexsort(keys, axis=-1)
  • 利用lexsort对二维数组按照某一行排序
    lexsort的键参数是二维数组时,对行排序,排序的方式是先对最后一行排序,当有相同元素时,然后按照倒数第二行对应的元素排序,……依次类推。
    例如:a1返回的是a的最后一行按照从小到大排列后所对应的索引值,比如最后一行为[6,2,9,5],从小到大排列为:2,5,6,9;其对应的索引号为:1,3,0,2.
    如果对a按照第二行升序排列,当有相同项时按照第一行升序排序.

    import numpy as np
    a = np.array([[1,2,1,5],[5,3,6,9],[6,2,9,5]])
    a.shape
    a
    #对a按照最后一行排序
    a1 = np.lexsort(a)
    a1
    a.T[a1].T
    #或者
    a[:, a1]
    #对a按照最后一行排序2
    a4 = np.lexsort(a[-1, None])
    a4
    a.T[a4].T
    #对a按照第二行升序排列,当有相同项时按照第一行升序排序
    a2 = np.lexsort(a[0:2, :])
    a2
    a.T[a2].T
    #或者
    a[:, a2]
    #对a按照第一行排序
    a3 = np.lexsort(a[::-1, :])
    a3
    a.T[a3].T
    #或者
    a[:, a3]
    #对a按照第一行排序2
    a5 = np.lexsort(a[0, None])
    a5
    a.T[a5].T
    

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • 利用lexsort对二维数组按照某一列排序
    只需将数组矩阵做转置,将列变成行,行变成列就可以了。例如:对a矩阵按照第二列升序排列,当遇到相同元素时按照第一列升序排列。首先对a矩阵装置,这样矩阵的列变成了行,然后在对行按照第二行升序的方式排列,都获取相应的序列编号。

    	a = np.array([[1,2,1,5],[5,3,6,9],[6,2,9,5]])
    	a.shape
    	a
    	#按最后一列顺序排序
    	a1 = np.lexsort(a.T)
    	a1
    	a[a1]
    	#或者
    	a[a1, :]
    	#按最后一列顺序排序2
    	a5 = np.lexsort(a.T[-1, None])
    	a5
    	a[a5]
    	#按最后一列逆序排序
    	a2 = np.lexsort(-a.T)
    	a2
    	a[a2]
    	#或者
    	a[a2, :]
    	#按第二列升序排序,当遇到相同元素按照第一列升序排列
    	a3 = np.lexsort(a.T[:2, :])
    	a3
    	a[a3]
    	#或者
    	a[a3, :]
    	#按照第一列排序
    	a4 = np.lexsort(a[:, ::-1].T)
    	a4
    	a[a4]
    	#或者
    	a[a4, :]
    	#按照第一列排序2
    	a6 = np.lexsort(a.T[0, None])
    	a6
    	a[a6]
    

    在这里插入图片描述
    在这里插入图片描述

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    在这里插入图片描述
    在这里插入图片描述

numpy.searchsorted

给定升序数组以及待插入元素,返回保持序列有序的插入位置。

  • 语法

    numpy.searchsorted(a, v, side='left', sorted=None)
    
  • 参数

    numpy.searchsorted(a, v, side='left', sorter=None)
    Parameters:		a : 1-D array_like
    					Input array. If sorter is None, then it must be sorted in
    					ascending order, otherwise sorter must be an array of
    					indices that sort it.
    				v : array_like
    					Values to insert into a.
    				side : {‘left’, ‘right’}, optional
    					If ‘left’, the index of the first suitable location found
    					is given. If ‘right’, return the last such index. If 
    					there is no suitable index, return either 0 or N (where N 
    					is the length of a).
    				sorter : 1-D array_like, optional
    					Optional array of integer indices that sort array a into
    					ascending order. They are typically the result of 
    					argsort.
    Returns:		indices : array of ints
    					Array of insertion points with the same shape as v
    
    
    • a 所需排序的数组
    • v 待查询索引的元素值
    • side 查询索引时的方向,其中kind=left为从左至右,kind=right为从右至左
    • sorder 一个字符串或列表,可以设置按照某个属性进行排序
  • 例子

    >>> list3=[1,2,3,4,5]
    >>> np.searchsorted(list3,2)
    1
    # 如若要在list3中插入元素2,则应当将其插在原列表索引为1的地方,即是插在元素1的后面
    >>> np.searchsorted(list3,[-5,7,4,9])
    array([0, 5, 3, 5], dtype=int64)
    # 如若要在list3中插入元素-5,则应当将其插在原列表索引为0的地方,即是插在元素1的前面
    # 其他以此类推...
    

numpy.partition

返回数组沿指定轴分区/部分排序的副本。排序后的数组副本第k个位置的元素的值不小于其左边元素的值,不大于其右边元素的值。也就是说,返回的数组副本的第k个位置的元素位于正确的有序位置。
把所有元素中按大小排第k位的元素放在排序结果的第k位,比它小的放在前面,比它大的放在后面

  • 语法

    numpy.partition(a, kth, axis=-1, kind='introselect', order=None)
    
  • 参数

    numpy.partition(a, kth, axis=-1, kind='introselect', order=None)
    Parameters:		a : array_like
    					Array to be sorted.
    				kth : int or sequence of ints
    					Element index to partition by. The k-th value of the
    					element will be in its final sorted position and all 
    					smaller elements will be moved before it and all equal or 
    					greater elements behind it. The order all elements in the 
    					partitions is undefined. If provided with a sequence of 
    					k-th it will partition all elements indexed by k-th of 
    					them into their sorted position at once.
    				axis : int or None, optional
    					Axis along which to sort. If None, the array is flattened
    					before sorting. The default is -1, which sorts along the 
    					last axis.
    				kind : {‘introselect’}, optional
    					Selection algorithm. Default is ‘introselect’.
    				order : str or list of str, optional
    					When a is an array with fields defined, this argument
    					specifies which fields to compare first, second, etc. A 
    					single field can be specified as a string. Not all fields 
    					need be specified, but unspecified fields will still be 
    					used, in the order in which they come up in the dtype, to 
    					break ties.
    Returns:		partitioned_array : ndarray
    					Array of the same type and shape as a
    
    
    • a 待排序的数组或类似数组的对象
    • kth 第k个位置,可指定多个位置
    • axis 待排序的轴,axis=None,将所有元素排序,返回一维数组;axis为其它整数值,则沿着指定轴排序,默认值-1,沿最后一个轴排序
    • kind 排序方法
    • order 用于指定字段的结构化数组排序的参数
  • 例子

    >>>list=[3,4,5,2,1]
    >>>np.partition(list,3)
    array([2, 1, 3, 4, 5])
    # 以排序后的第3个数,即3进行分区,分区后的结果即是:
    # 小于3的元素2,1位于3的前面,大于等于3的元素4,5位于3的后面
    >>>a = np.array([[3, 4, 2, 1],[7,5,6,8]])
    >>>np.partition(a,kth=3,axis=1)# along the sencond axis (column)
    array([[2, 1, 3, 4],
           [6, 5, 7, 8]])
    >>>np.partition(a,kth=0,axis=0)# along the first axis (row)
    array([[3, 4, 2, 1],
           [7, 5, 6, 8]])
    

    在这里插入图片描述

    >>> a = np.array([ 8, 10,  3,  2, 14, 9,  7, 11,  0, 13, 6,  1,  5,  4, 12, 15])
    >>> np.partition(a, 4)# 第4个位置的元素位于正确有序元素,即元素4位于有序位置
    array([ 2,  0,  1,  3,  4,  5,  6, 10,  7,  8,  9, 11, 13, 14, 12, 15])
    >>> np.partition(a, (4,12))	# 第4和12个位置的元素位于正确有序位置
    array([ 2,  0,  1,  3,  4,  5,  6, 10,  7,  8,  9, 11, 12, 14, 13, 15])
    a = np.asarray([np.random.randint(0,20, 10) for _ in range(10)])
    >>> a = np.asarray([np.random.randint(0,10, 10) for _ in range(5)])
    >>> a
    array([[1, 0, 2, 2, 0, 1, 7, 3, 6, 9],
           [9, 8, 0, 2, 8, 2, 0, 2, 6, 9],
           [2, 6, 3, 5, 5, 7, 7, 3, 2, 2],
           [3, 2, 7, 8, 5, 1, 2, 1, 3, 1],
           [4, 0, 1, 4, 3, 2, 2, 3, 9, 7]])
    >>> np.partition(a, 2, axis=0)	# 对各列分区排序,结果第2行为分界线
    array([[1, 0, 0, 2, 0, 1, 0, 1, 2, 1],
           [2, 0, 1, 2, 3, 1, 2, 2, 3, 2],
           [3, 2, 2, 4, 5, 2, 2, 3, 6, 7],
           [9, 6, 7, 8, 5, 7, 7, 3, 6, 9],
           [4, 8, 3, 5, 8, 2, 7, 3, 9, 9]])
    >>> np.partition(a, 5, axis=1)		# 对各行分区排序,结果第5列为分界线
    array([[0, 0, 1, 1, 2, 2, 3, 6, 7, 9],
           [2, 2, 0, 0, 2, 6, 8, 8, 9, 9],
           [2, 2, 2, 3, 3, 5, 5, 6, 7, 7],
           [1, 1, 1, 2, 2, 3, 3, 8, 7, 5],
           [0, 1, 2, 2, 3, 3, 4, 4, 9, 7]])
    

    在这里插入图片描述

numpy.argpartition

返回数组沿指定轴分区/部分排序的索引数组。索引数组中位置k的索引对应的元素不小于位置k之前索引对应的元素,不大于位置k之后索引对应的元素。

  • 语法

    numpy.argpartition(a, kth, axis=-1, kind='introselect', order=None)
    
  • 参数

    • a待排序的数组或类似数组的对象索引
    • kth 第k个为在,可指定多个位置
    • axis 待排序的轴,axis=None,将所有元素排序,返回一维数组;axis为其它整数值,则沿着指定轴排序,默认值-1,沿最后一个轴排序
    • kind 排序方法
    • order 用于指定字段结构化数组排序的参数
  • 例子

    >>> a = np.array([ 8, 10,  3,  2, 14, 9,  7, 11,  0, 13, 6,  1,  5,  4, 12, 15])
    >>> np.argpartition(a, 4)
    array([ 3,  8, 11,  2, 13, 12, 10,  1,  6,  0,  5,  7,  9,  4, 14, 15],
          dtype=int64)
    >>> np.argpartition(a, (4,12))
    array([ 3,  8, 11,  2, 13, 12, 10,  1,  6,  0,  5,  7, 14,  4,  9, 15],
          dtype=int64)
    >>> a[np.argpartition(a, (4,12))]	# 等价于np.partition(a, (4,12))
    array([ 2,  0,  1,  3,  4,  5,  6, 10,  7,  8,  9, 11, 12, 14, 13, 15])
    

参考资料

1.sorted()、sort()函数
2.Python中的a.sort,sorted(a),np_argsort(a)和np.lexsort(b,a)
3.Numpy进阶之排序小技巧
4.numpy排序(sort、argsort、lexsort、partition、sorted)
5.Python——numpy排序(sort、argsort、lexsort、partition、sorted)
6.numpy sort/argsort, lexsort,sort_complex,partition
7.numpy中二维数组按照某列、某行排序
8.numpy排序(sort、argsort、lexsort、partition、sorted)
9.NumPy 排序函数
10.Numpy数组的排序与选择:sort, argsort, partition, argpartition, searchsorted, lexsort等
11.numpy排序(sort、argsort、lexsort、partition、sorted)
12.NumPy排序,搜索和计数功能
13.python基于numpy的多维数组排序

  • 0
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值