I apologize if this is misguided. Something that might be useful is to have a crate that functions as an ndimensional equivalent to num_traits completely divorced from assumptions about the implementation in ndarray.
My rationale is a lot of scientific computing libraries (in rust and elsewhere) seem to be one-off herculean efforts that then just continue to be used so long as the library is usable with the other libraries the end developer is using, and there are only so many ways to represent an ndimensional data structure in terms of actual data layout. The Nd traits could be generic enough to account for each of representations. If they are implemented for other nd/tensor types (for example candle's cpu tensors or rapl's Ndarr), either directly or with a wrapper type, then they provide a better target for authors of single purpose libraries (such as an ND fft, or a perlin noise generator): They can write something that uses the traits that ensure the implementor has the properties/functions they need, use one of the implementors for testing (such as ndarray), and then barely touch it afterwards.
I apologize if this is misguided. Something that might be useful is to have a crate that functions as an ndimensional equivalent to
num_traitscompletely divorced from assumptions about the implementation in ndarray.My rationale is a lot of scientific computing libraries (in rust and elsewhere) seem to be one-off herculean efforts that then just continue to be used so long as the library is usable with the other libraries the end developer is using, and there are only so many ways to represent an ndimensional data structure in terms of actual data layout. The Nd traits could be generic enough to account for each of representations. If they are implemented for other nd/tensor types (for example candle's cpu tensors or rapl's Ndarr), either directly or with a wrapper type, then they provide a better target for authors of single purpose libraries (such as an ND fft, or a perlin noise generator): They can write something that uses the traits that ensure the implementor has the properties/functions they need, use one of the implementors for testing (such as ndarray), and then barely touch it afterwards.