spectrochempy.sort
- sort(**kwargs)[source]
- Return the dataset sorted along a given dimension. - By default, it is the last dimension [axis=-1]) using the numeric or label values. - Parameters:
- dim (str or int, optional, default=-1) – Dimension index or name along which to sort. 
- pos (int , optional) – If labels are multidimensional - allow to sort on a define row of labels : labels[pos]. Experimental : Not yet checked. 
- by (str among [‘value’, ‘label’], optional, default=`value`) – Indicate if the sorting is following the order of labels or numeric coord values. 
- descend ( - bool, optional, default=`False`) – If true the dataset is sorted in a descending direction. Default is False except if coordinates are reversed.
- inplace (bool, optional, default=`False`) – Flag to say that the method return a new object (default) or not (inplace=True). 
 
- Returns:
- NDDataset– Sorted dataset.
 
