Open grothesque opened 1 month ago
I'm working on a new library for tensor network computations. See there for a design sketch. (Comments are most welcome!)
I think that mdarray could be ideal as the dense array backend for my library, but the one crucial missing feature is support for dynamic number of dimensions.
Would you be open to adding support for dynamic number of dimensions (following the idea you sketch out above) to mdarray?
Yes, I have a prototype that just needs to be cleaned up.
Please see the latest commit for dynamic rank support.
I reference a discussion from https://github.com/rust-ndarray/ndarray/issues/1272#issuecomment-2325747608:
@fre-hu wrote:
Please correct me if I'm wrong, but with today's mdarray it is simply not possible to have arrays beyond a certain rank.
Of course there is no way around this with today's Rust given that macros need to be instantiated for each supported number of dimensions. And also the value of supporting static shapes beyond, say, 10 dimensions, seems marginal.
But for completeness and interfacing with other general array libraries, I think that supporting a fully generic layout would be very valuable.