haojin2 commented on a change in pull request #17393: [Numpy] Add sort op
URL: https://github.com/apache/incubator-mxnet/pull/17393#discussion_r369886238
##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -1223,6 +1224,49 @@ def argsort(a, axis=-1, kind=None, order=None):
return _npi.argsort(data=a, axis=axis, is_ascend=True, dtype='int64')
+@set_module('mxnet.ndarray.numpy')
+def sort(a, axis=-1, kind=None, order=None):
+ """
+ Return a sorted copy of an array.
+ Parameters
+ ----------
+ a : ndarray
+ Array to be sorted.
+ 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 : string, optional
+ This argument can take any string, but it does not have any effect on
the
+ final result.
+ order : str or list of str, optional
+ Not supported yet, will raise NotImplementedError if not None.
+ Returns
+ -------
+ sorted_array : ndarray
+ Array of the same type and shape as `a`.
+
+ Notes
+ -----
+ This operator does not support different sorting algorithms.
+
+ --------
Review comment:
delete this line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services