Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.linalg.slogdet

Contents

jax.numpy.linalg.slogdet#

jax.numpy.linalg.slogdet(a,*,method=None)[source]#

Compute the sign and (natural) logarithm of the determinant of an array.

JAX implementation ofnumpy.linalg.slogdet().

Parameters:
  • a (ArrayLike) – array of shape(...,M,M) for which to compute the sign and log determinant.

  • method (str |None) –

    the method to use for determinant computation. Options are

    • 'lu' (default): use the LU decomposition.

    • 'qr': use the QR decomposition.

Returns:

A tuple of arrays(sign,logabsdet), each of shapea.shape[:-2]

  • sign is the sign of the determinant.

  • logabsdet is the natural log of the determinant’s absolute value.

Return type:

SlogdetResult

See also

jax.numpy.linalg.det(): direct computation of determinant

Examples

>>>a=jnp.array([[1,2],...[3,4]])>>>sign,logabsdet=jnp.linalg.slogdet(a)>>>sign# -1 indicates negative determinantArray(-1., dtype=float32)>>>jnp.exp(logabsdet)# Absolute value of determinantArray(2., dtype=float32)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp