I thinking using nalgebra's vector and matrix is good.
For example,
fn new_from_nalgebra(mean :nalgebra::DVector<f64>, cov :nalgebra::DMatrix<f64>) -> statrs::Result<Self> {
/* here is not necessary
let mean = DVector::from_vec(mean);
let cov = DMatrix::from_vec(mean.len(), mean.len(), cov);
*/
let dim = mean.len();
// Check that the provided covariance matrix is symmetric
// omitted others
I thinking using
nalgebra
's vector and matrix is good. For example,What do you think about this?