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. Prametersaxisis supported only with default valueNone. Prametersoutis supported only with default valueNone. Prametersoverwrite_inputis supported only with default valueFalse. Prameterskeepdimsis 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.meanCompute the arithmetic mean along the specified axis.
dpnp.percentileCompute 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