mlx.core.clip#
- mlx.core.clip(a: array, /, a_min: Union[scalar, array, None], a_max: Union[scalar, array, None], *, stream: Union[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.