Expand description
Validation helpers shared across backends and exec layers.
§Examples
use tenferro_tensor::validate::validate_nonsingular_u;
use tenferro_tensor::{Tensor, TypedTensor};
let t = Tensor::F64(TypedTensor::from_vec_col_major(vec![2, 2], vec![1.0, 0.0, 0.0, 1.0]).unwrap());
assert!(validate_nonsingular_u(&t).is_ok());Traits§
- Diag
Singularity - Trait for detecting singular or non-finite diagonal entries.
Functions§
- can_
convert_ dtype - Return whether public
convertmay changefromintoto. - check_
singular_ diagonal - Checks that every diagonal element of a (possibly batched) upper-triangular factor is non-singular and finite.
- checked_
shape_ product - Compute a shape product with overflow reported as a typed tensor error.
- matmul_
config_ for_ shapes - Validate rank-2 matrix multiplication shapes and return its dot-general config.
- promote_
dtype - Promote two dtypes according to tenferro’s public dtype-promotion lattice.
- validate_
convert_ dtype - Validate a public checked dtype conversion.
- validate_
nonsingular_ u - Validates that the upper-triangular factor
uof a matrix decomposition has no singular (zero) or non-finite diagonal entries. - validate_
permutation_ axes - Validate a full permutation for a tensor rank.
- validate_
unique_ axes - Validate a subset of axes for a tensor rank.