pub fn cholesky<B: Backend, T: LinalgScalar>(a: &Array<B, T>) -> Array<B, T>Expand description
The Cholesky factor L (lower triangular, a = L L^T) of each
symmetric positive definite matrix, as jnp.linalg.cholesky (the input
is symmetrized first). Matrices that are not positive definite give
NaNs.
§Panics
Panics if a is not a batch of square matrices.
§Examples
use ruxla_core::{Array, Native, jnp};
let a = Array::<Native, f64>::from_vec(vec![4.0, 2.0, 2.0, 5.0], [2, 2]);
assert_eq!(jnp::linalg::cholesky(&a).to_vec(), [2.0, 0.0, 1.0, 2.0]);