Skip to content

Conversation

@jlchan
Copy link
Contributor

@jlchan jlchan commented Mar 14, 2025

Addresses SciML/OrdinaryDiffEq.jl#2625 (comment)

The issue is that VectorOfArray indexing will not mutate a VectorOfArray{StructArray} due to the way StructArrays treats assignment: https://juliaarrays.github.io/StructArrays.jl/stable/counterintuitive/#Modifying-a-field-of-a-struct-element. For example:

u = VectorOfArray(StructArray{MVector{1, Float64}}(ntuple(_ -> [1.0, 2.0], 1)))
u[1,1] = 100
@show u[1,1] # this is still 1.0

@jlchan
Copy link
Contributor Author

jlchan commented Mar 14, 2025

I don't think Downgrade and Format CI failures are related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants