det

Contents

det#

class saiunit.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 is u ** 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 unit a.unit ** M for 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