dpnp.fmax
- dpnp.fmax(x1, x2, /, out=None, *, where=True, dtype=None, subok=True, **kwargs)[source]
Element-wise maximum of array elements.
For full documentation refer to
numpy.fmax
.- Returns:
out -- The maximum of x1 and x2, element-wise, ignoring NaNs.
- Return type:
dpnp.ndarray
Limitations
Parameters x1 and x2 are supported as either scalar,
dpnp.ndarray
ordpctl.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.maximum
Element-wise maximum of array elements, propagates NaNs.
dpnp.fmin
Element-wise minimum of array elements, ignores NaNs.
dpnp.max
The maximum value of an array along a given axis, propagates NaNs..
dpnp.nanmax
The maximum value of an array along a given axis, ignores NaNs.
dpnp.minimum
Element-wise minimum 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.fmax(x1, x2) array([2, 5, 4])
>>> x1 = np.eye(2) >>> x2 = np.array([0.5, 2]) >>> np.fmax(x1, x2) # broadcasting array([[1. , 2. ], [0.5, 2. ]])
>>> x1 = np.array([np.nan, 0, np.nan]) >>> x2 = np.array([0, np.nan, np.nan]) >>> np.fmax(x1, x2) array([ 0., 0., nan])