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_minora_maxareNone, then corresponding edge is ignored. At least one ofa_minanda_maxcannot beNone. The inputaand the limits must broadcast with one another.