Expand description
Array validation: finiteness, sign, symmetry, orthogonality, positive-definiteness, stochasticity
§Array Validation Utilities
Comprehensive validation functions for ndarray arrays, covering finiteness, sign constraints, matrix properties (symmetry, orthogonality, positive-definiteness, stochasticity), shape matching, and diagnostic summaries.
All functions return CoreResult and avoid panics.
Structs§
- Array
Stats - Summary statistics for an array, useful for diagnostics.
Functions§
- assert_
finite - Assert that every element of the array is finite (not NaN, not Inf).
- assert_
non_ negative - Assert that every element is non-negative (>= 0).
- assert_
orthogonal - Assert that a 2-D matrix is orthogonal within tolerance.
- assert_
positive - Assert that every element is strictly positive (> 0).
- assert_
positive_ definite - Assert that a 2-D symmetric matrix is positive definite.
- assert_
shape - Assert that the array has the exact expected shape.
- assert_
stochastic - Assert that a 2-D matrix is (row-)stochastic: each row sums to 1 within tolerance, and all elements are non-negative.
- assert_
symmetric - Assert that a 2-D matrix is symmetric within a given tolerance.
- compute_
array_ stats - Compute summary statistics for a flat array.
- diagnose_
array - Comprehensive array health check, returning a human-readable diagnostic string.