dpnp.median
- dpnp.median(x1, axis=None, out=None, overwrite_input=False, keepdims=False)[source]
Compute the median along the specified axis.
For full documentation refer to
numpy.median
.Limitations
Input array is supported as
dpnp.ndarray
. Prametersaxis
is supported only with default valueNone
. Prametersout
is supported only with default valueNone
. Prametersoverwrite_input
is supported only with default valueFalse
. Prameterskeepdims
is supported only with default valueFalse
. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.mean
Compute the arithmetic mean along the specified axis.
dpnp.percentile
Compute the q-th percentile of the data along the specified axis.
Examples
>>> import dpnp as np >>> a = np.array([[10, 7, 4], [3, 2, 1]]) >>> np.median(a) 3.5