-
Notifications
You must be signed in to change notification settings - Fork 69
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
Arrays of ForwardDiff Duals incorrectly marked as not mutable? #1611
Comments
ChrisRackauckas
added a commit
to SciML/SciMLSensitivity.jl
that referenced
this issue
Jul 5, 2024
Something is very strange here with ForwardDiff.Dual. julia> T = ForwardDiff.Dual{ForwardDiff.Tag{Nothing, Float64}, Float64, 3}
Dual{ForwardDiff.Tag{Nothing, Float64}, Float64, 3}
julia> ismutable(T)
true
julia> v = T(0)
Dual{ForwardDiff.Tag{Nothing, Float64}}(0.0,0.0,0.0,0.0)
julia> v.
partials
value
julia> v.value = 3
ERROR: setfield!: immutable struct of type Dual cannot be changed
Stacktrace:
[1] setproperty!(x::Dual{ForwardDiff.Tag{Nothing, Float64}, Float64, 3}, f::Symbol, v::Int64)
@ Base ./Base.jl:41
[2] top-level scope
@ REPL[10]:1 @vchuravy any ideas? |
oh never mind, this is an accidental use of ismutable instead of ismutabletype |
Fixed by #1612 |
Can this get a tag? |
ChrisRackauckas
added a commit
to SciML/SciMLSensitivity.jl
that referenced
this issue
Jul 9, 2024
ChrisRackauckas
added a commit
to SciML/SciMLSensitivity.jl
that referenced
this issue
Jul 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: