geope.jax.logm¤
geope.jax.logm.roots_legendre(n, max_n=10)
¤
Compute roots and weights for Gauss-Legendre quadrature.
JAX implementation compatible with JIT compilation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Quadrature order. |
required |
max_n
|
int
|
Maximum number of roots to compute. Output arrays
will have this size; entries beyond |
10
|
Returns:
| Type | Description |
|---|---|
tuple[Array, Array]
|
A tuple |
Note
For inputs of 10000 and more, results may include NaNs due to precision errors.
References
W. H. Press et al., Numerical Recipes in FORTRAN (1992), section 4.5, page 152.
geope.jax.logm.sqrtm(A, blocksize=1)
¤
Compute the matrix square root.
JAX implementation of scipy.linalg.sqrtm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Union
|
Array of shape |
required |
blocksize
|
int
|
Not supported in JAX; always uses |
1
|
Returns:
| Type | Description |
|---|---|
Array
|
An array of shape |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If |
References
Björck, Å., & Hammarling, S. (1983). "A Schur method for the square root of a matrix". Linear Algebra and its Applications, 52, 127–140.
geope.jax.logm.logm(A, key)
¤
Compute the matrix logarithm.
JAX implementation of scipy.linalg.logm using the improved
inverse scaling-and-squaring method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Union
|
Array of shape |
required |
key
|
Union
|
JAX PRNG key for internal norm estimation. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of shape |
References
Al-Mohy, A. H., & Higham, N. J. (2012). "Improved Inverse Scaling and Squaring Algorithms for the Matrix Logarithm". SIAM J. Sci. Comput., 34(4), C152–C169.
geope.jax.logm.rsf2csf(T, Z, check_finite=True)
¤
Convert real Schur form to complex Schur form.
JAX implementation of scipy.linalg.rsf2csf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
T
|
Union
|
Array of shape |
required |
Z
|
Union
|
Array of shape |
required |
check_finite
|
bool
|
Unused by JAX (present for API compatibility). |
True
|
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
Schur form and its transformation matrix. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |