det

paddle.linalg. det ( x, name=None ) [source]

Calculates determinant value of a square matrix or batches of square matrices.

Parameters
  • x (Tensor) – the input matrix of size (n, n) or the batch of matrices of size (*, n, n) where * is one or more batch dimensions.

  • name (str, optional) – Name of the output.It’s used to print debug info for developers. Details: Name. Default is None.

Returns

Tensor, the determinant value of a square matrix or batches of square matrices.

Examples

>>> import paddle
>>> paddle.seed(2023)
>>> x =  paddle.randn([3,3,3])
>>> A = paddle.linalg.det(x)
>>> print(A)
Tensor(shape=[3], dtype=float32, place=Place(cpu), stop_gradient=True,
[-1.29280925,  0.77832544,  0.89754158])