mm.math.clip

math.clip(a_min, a_max)

Clips array to the interval [a_min, a_max].

Parameters:
  • array (ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]) – The array to clip.

  • a_min (float) – The minimum value.

  • a_max (float) – The maximum value.

Return type:

ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]

Returns:

The clipped array.