dpnp.sort

dpnp.sort(x1, **kwargs)[source]

Return a sorted copy of an array.

For full documentation refer to numpy.sort.

Limitations

Input array is supported as dpnp.ndarray. Keyword arguments kwargs are currently unsupported. Dimension of input array is supported to be equal to 1. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.

See also

dpnp.argsort

Indirect sort.

dpnp.lexsort

Indirect stable sort on multiple keys.

dpnp.searchsorted

Find elements in a sorted array.

dpnp.partition

Partial sort.

Examples

>>> import dpnp as np
>>> a = np.array([1, 4, 3, 1])
>>> out = np.sort(a)
>>> [i for i in out]
[1, 1, 3, 4]