DimensionalData.jl icon indicating copy to clipboard operation
DimensionalData.jl copied to clipboard

Invalid assignment to DimArray indexed by DimSelectors

Open ggebbie opened this issue 1 year ago • 1 comments

Great package! I use it a lot.

Here's what I'd like to accomplish (assignment/update to a DimSelectors index):

A = rand(X(1.0:0.2:2.0), Y(10:2:20))
 B = rand(X(1.0:0.2:1.6), Y(10:2:20))

 A[DimSelectors(B)] # all ok with output to screen
 A[DimSelectors(B)] += B # long error including "Use stardard indices, `Selector`s, or `Val` for compile-time `At`."

I didn't expect my naive formulation to work, but I haven't found a workaround yet. Closed issue #683 seems close. I am guessing that rebuild may be one way to accomplish my goal.

ggebbie avatar Aug 02 '24 19:08 ggebbie

Thanks, seems there are a few bugs there, will fix.

rafaqz avatar Aug 03 '24 08:08 rafaqz

I confirm that the bug fix works for me. Thanks a ton! This bug fix will help me showcase DimensionalData.jl in a computational notebook that will accompany a manuscript submission to Journal of Advances in Modeling Earth Systems .

ggebbie avatar Aug 05 '24 18:08 ggebbie

Amazing, post the paper when its out :)

rafaqz avatar Aug 06 '24 14:08 rafaqz