Skip to contents

Supports input of float, double, cfloat and cdouble dtypes. Also supports batches of matrices, and if A is a batch of matrices then the output has the same batch dimensions.

Usage

linalg_det(A)

Arguments

A

(Tensor): tensor of shape (*, n, n) where * is zero or more batch dimensions.

Examples

if (torch_is_installed()) {
a <- torch_randn(3, 3)
linalg_det(a)

a <- torch_randn(3, 3, 3)
linalg_det(a)
}
#> torch_tensor
#>  1.0571
#> -0.1126
#> -1.0908
#> [ CPUFloatType{3} ]