dpctl.tensor.max¶
- dpctl.tensor.max(x, /, *, axis=None, keepdims=False, out=None)[source]¶
Calculates the maximum value of the input array
x
.- Parameters:
x (usm_ndarray) – input array.
axis (Optional[int, Tuple[int, ...]]) – axis or axes along which maxima must be computed. If a tuple of unique integers, the maxima are computed over multiple axes. If
None
, the max is computed over the entire array. Default:None
.keepdims (Optional[bool]) – if
True
, the reduced axes (dimensions) are included in the result as singleton dimensions, so that the returned array remains compatible with the input arrays according to Array Broadcasting rules. Otherwise, ifFalse
, the reduced axes are not included in the returned array. Default:False
.out (Optional[usm_ndarray]) – the array into which the result is written. The data type of
out
must match the expected shape and the expected data type of the result. IfNone
then a new array is returned. Default:None
.
- Returns:
an array containing the maxima. If the max was computed over the entire array, a zero-dimensional array is returned. The returned array has the same data type as
x
.- Return type: