det#
- class brainunit.linalg.det(a, **kwargs)#
Compute the determinant of a matrix.
SaiUnit implementation of
numpy.linalg.det().For a Quantity with unit u and an
(N, N)matrix the resulting unit isu ** N.- Parameters:
a (
Array|ndarray|bool|number|bool|int|float|complex| saiunit.Quantity) – Square input of shape(..., M, M).- Returns:
out – Determinant(s) of shape
a.shape[:-2]. Carries unita.unit ** Mfor an(M, M)matrix.- Return type:
Array|ndarray|bool|number|bool|int|float|complex| saiunit.Quantity
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> a = jnp.array([[1., 2.], ... [3., 4.]]) * u.meter >>> u.linalg.det(a) -2. * meter2