-
Notifications
You must be signed in to change notification settings - Fork 41
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
dims keyword constructor gives unintuitive result when types do not match #200
Comments
Here's another concerning case: julia> a = collect(reshape(1:9, 3, 3))
3×3 Matrix{Int64}:
1 4 7
2 5 8
3 6 9
julia> soa = StructArray{Complex{Int}}(a; dims=1)
3-element StructArray(view(::Matrix{Int64}, 1, :), view(::Matrix{Int64}, 2, :)) with eltype Complex{Int64}:
1 + 2im
4 + 5im
7 + 8im I would have expected an error rather than just silently dropping the extra rows of |
CC: @simonbyrne, who I think wrote the implementation of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MWE:
It is probably best to error if types do not match.
The text was updated successfully, but these errors were encountered: