mlx.core.clip#
- clip(a: array, /, a_min: scalar | array | None, a_max: scalar | array | None, *, stream: None | Stream | Device = None) array #
Clip the values of the array between the given minimum and maximum.
If either
a_min
ora_max
areNone
, then corresponding edge is ignored. At least one ofa_min
anda_max
cannot beNone
. The inputa
and the limits must broadcast with one another.