Closed pmarks closed 5 years ago
I think adding a ndarray::linalg::dot
implementation is a good idea. I would keep the Mul
implementation though, as the types in sprs are matrices, not arrays, so the natural expectation is that
the multiplication is matrix multiplication.
It should however be possible to add another type, a sparse array type, that would implement Mul
for
coefficient-wise multiplication.
I'm trying to write some large-scale SVDs methods that are generic over the type of the input array -- I'd like to to support ndarray::ArrayBase, sprs, and a custom compressed matrix format.
I noticed that ndarray uses this trait for matrix-matrix or matrix-vector multiply: ndarray::linalg::Dot, but sprs use std::ops::Mul. (ndarray uses Mul for point-wise multiplication).