Open tpapp opened 10 months ago
Did you resolve it? I have the same problem with Sparse arrays
No, unfortunately not. After not getting a reply here I decided not to use this package.
Thanks for your response. Which alternative did you use?
Hey all. ComponentArrays re-form your data to a dense array under the hood so unfortunately inputting things like static arrays or sparse arrays wouldn't be very useful (although it would be useful to unpack to those types, which we don't currently do). So that's one issue here. The other is that arrays of arrays as components aren't well supported. This is mostly due to the fact that we wouldn't have any way of handling jagged arrays because the size needs to be encoded in the type domain at the outer level. I'm actually surprised that that first example works. Supporting arrays of same-sized static arrays would make sense, but they're currently unsupported. But I do agree that that error message isn't super helpful.
Right now as a workaround you could always just wrap the inner arrays in some sort of named tuple.
a = [(v=zeros(3),) for _ in 1:5]
ComponentVector((; a))
I am new to this package and it may be possible that I am misusing it, but
stacktrace:
versions: