dpnp.fmin

dpnp.fmin(x1, x2, /, out=None, *, where=True, dtype=None, subok=True, **kwargs)[source]

Element-wise minimum of array elements.

For full documentation refer to numpy.fmin.

Returns:

out – The minimum of x1 and x2, element-wise, ignoring NaNs.

Return type:

dpnp.ndarray

Limitations

Parameters x1 and x2 are supported as either scalar, dpnp.ndarray or dpctl.tensor.usm_ndarray, but both x1 and x2 can not be scalars at the same time. Parameters where, dtype and subok are supported with their default values. Keyword argument kwargs is currently unsupported. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by real-valued data types.

See also

dpnp.minimum

Element-wise minimum of array elements, propagates NaNs.

dpnp.fmax

Element-wise maximum of array elements, ignores NaNs.

dpnp.min

The minimum value of an array along a given axis, propagates NaNs.

dpnp.nanmin

The minimum value of an array along a given axis, ignores NaNs.

dpnp.maximum

Element-wise maximum of array elements, propagates NaNs.

dpnp.fmod

Calculate the element-wise remainder of division.

Examples

>>> import dpnp as np
>>> x1 = np.array([2, 3, 4])
>>> x2 = np.array([1, 5, 2])
>>> np.fmin(x1, x2)
array([1, 3, 2])
>>> x1 = np.eye(2)
>>> x2 = np.array([0.5, 2])
>>> np.fmin(x1, x2) # broadcasting
array([[0.5, 0. ],
       [0. , 1. ]]
>>> x1 = np.array([np.nan, 0, np.nan])
>>> x2 = np.array([0, np.nan, np.nan])
>>> np.fmin(x1, x2)
array([ 0.,  0., nan])