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
#> -0.1705
#> -0.2190
#>  0.6716
#> [ CPUFloatType{3} ]