cupy.linalg.norm#

cupy.linalg.norm(x, ord=None, axis=None, keepdims=False)[source]#

Returns one of matrix norms specified by ord parameter.

See numpy.linalg.norm for more detail.

Parameters:
  • x (cupy.ndarray) – Array to take norm. If axis is None, x must be 1-D or 2-D.

  • ord (non-zero int, inf, -inf, 'fro') – Norm type.

  • axis (int, 2-tuple of ints, None) – 1-D or 2-D norm is cumputed over axis.

  • keepdims (bool) – If this is set True, the axes which are normed over are left.

Returns:

cupy.ndarray