-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting "Only homogeneous arrays are allowed" error for Vector{SVector} #239
Comments
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:
The text was updated successfully, but these errors were encountered: