Skip to content
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

Unable to broadcast assign to IMAS expression #107

Open
bclyons12 opened this issue Dec 14, 2023 · 1 comment
Open

Unable to broadcast assign to IMAS expression #107

bclyons12 opened this issue Dec 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bclyons12
Copy link
Member

I attempted to do something like cp1d.conductivity_parallel .= 1.0 ./ eta. It runs as if it works, but then cp1d.conductivity_parallel is unchanged in the dd. Running it with = works fine.

@bclyons12 bclyons12 added the bug Something isn't working label Dec 14, 2023
@bclyons12
Copy link
Member Author

Maybe this will help determine the correct failure mode. If I try to do something like that for a range, I get:

ERROR: CanonicalIndexError: setindex! not defined for StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}
Stacktrace:
 [1] error_if_canonical_setindex(#unused#::IndexLinear, A::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, #unused#::Int64)
   @ Base ./abstractarray.jl:1407
 [2] setindex!
   @ ./abstractarray.jl:1398 [inlined]
 [3] fill!
   @ ./multidimensional.jl:1086 [inlined]
 [4] copyto!
   @ ./broadcast.jl:934 [inlined]
 [5] materialize!
   @ ./broadcast.jl:884 [inlined]
 [6] materialize!(dest::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}, Nothing, typeof(identity), Tuple{Float64}})
   @ Base.Broadcast ./broadcast.jl:881
 [7] top-level scope
   @ REPL[42]:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants