ivy.clip_matrix_norm(x: Union[ivy.Array, ivy.NativeArray], max_norm: float, p: float = 2.0) → Union[ivy.Array, ivy.NativeArray][source]

Clips (limits) the matrix norm of an array.

  • x (array) – Input array containing elements to clip.

  • max_norm (float) – The maximum value of the array norm.

  • p (float, optional) – The p-value for computing the p-norm. Default is 2.


An array with the matrix norm downscaled to the max norm if needed.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty