-
Notifications
You must be signed in to change notification settings - Fork 17
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
Setting OffsetArray(::StaticArray) falling back to Vector #153
Comments
Great issue! Ideally
|
I actually tried defining this locally, but @inline function Setfield.setindex(A::OffsetVector{T,S}, val, i::Int) where {T,S<:StaticArray}
@boundscheck checkbounds(A, i)
OffsetVector{T,S}(setindex(parent(A), val, OffsetArrays.parentindex(Base.axes1(A), i)), A.offsets)
end Anyway, you certainly know better than me, but thought I'd mention that. |
Yes it is fine to do that. I will only break, if the issue is fixed properly. |
@set!
is awesome for StaticArrays,but if the array if
OffsetArray(::StaticArray)
, it seems to fall back toOffsetArray(::Array)
.Is there some special-case I could define in my session to handle this? Could this be fixed generally?
Julia 1.6 / Setfield v0.7.0 / StaticArrays v1.0.1 / OffsetArrays v1.5.3
The text was updated successfully, but these errors were encountered: