mlx.core.max

目录

mlx.core.max#

max(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: None | Stream | Device = None) array#

A max reduction over the given axes.

参数:
  • a (array) -- Input array.

  • axis (int or list(int), optional) -- Optional axis or axes to reduce over. If unspecified this defaults to reducing over the entire array.

  • keepdims (bool, optional) -- Keep reduced axes as singleton dimensions, defaults to False.

返回:

The output array with the corresponding axes reduced.

返回类型:

array