vector_norm

ivy.vector_norm(x, p=2, axis=None, keepdims=False)[source]

Compute the vector p-norm.

Parameters
  • x (array) – Input array.

  • p (int or str, optional) – Order of the norm. Default is 2.

  • axis (int or sequence of ints, optional) – If axis is an integer, it specifies the axis of x along which to compute the vector norms. Default is None, in which case the flattened array is considered.

  • keepdims (bool, optional) – If this is set to True, the axes which are normed over are left in the result as dimensions with size one. With this option the result will broadcast correctly against the original x. Default is False.

Returns

Vector norm of the array at specified axes.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty