ndarray
ndarray copied to clipboard
impl ScalarOperand for Ratio<i32 and i64>
Would you consider adding the above-mentioned impl to enable a more ergonomic handling of arrays of rational numbers?
Hi @mindv0rtex. I don't understand what you're suggesting. Can you please provide more information and/or a code example?
I apologize if my request is too opaque.
I had an application where I was performing scalar operations on a matrix of instances of num::rational::Ratio. It was not very ergonomic, because the ScalarOperand trait: https://docs.rs/ndarray/latest/ndarray/trait.ScalarOperand.html, is not implemented for it. I thought since you already have this trait implemented for num::complex::Complex, adding the Ratio support would be a reasonable request.