-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
bugSomething isn't workingSomething isn't working
Description
julia> dat = rand(X(1:5), Y(-3:4))
┌ 5×8 DimArray{Float64, 2} ┐
├──────────────────────────┴─────────────────────── dims ┐
↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
→ Y Sampled{Int64} -3:4 ForwardOrdered Regular Points
└────────────────────────────────────────────────────────┘
↓ → -3 -2 -1 0 1 2 3 4
1 0.309807 0.4867 0.240609 0.917469 0.263311 0.294418 0.345794 0.0608446
2 0.0355864 0.265488 0.838476 0.453785 0.641885 0.885175 0.108609 0.448046
3 0.377352 0.260742 0.64197 0.950541 0.938076 0.258737 0.105349 0.957992
4 0.295898 0.455932 0.986516 0.812782 0.240615 0.427066 0.636374 0.396486
5 0.698749 0.681683 0.137355 0.477724 0.601639 0.822453 0.157296 0.483171
julia> f(pts, val) = pts[1] + pts[2] + val
f (generic function with 1 method)julia> @d f.(dat |> DimPoints, dat)
ERROR: ArgumentError: Failed to assign fields (:data, :dims) to object with fields (:dims, :order).
Stacktrace:
[1] macro expansion
@ C:\Users\T0185914\.julia\packages\ConstructionBase\3a7dg\src\ConstructionBase.jl:97 [inlined]
[2] check_patch_fields_exist(obj::DimPoints{…}, patch::@NamedTuple{…})
@ ConstructionBase C:\Users\T0185914\.julia\packages\ConstructionBase\3a7dg\src\ConstructionBase.jl:97
[3] setproperties_object(obj::DimPoints{…}, patch::@NamedTuple{…})
@ ConstructionBase C:\Users\T0185914\.julia\packages\ConstructionBase\3a7dg\src\ConstructionBase.jl:164
[4] setproperties(obj::DimPoints{Tuple{…}, 2, Tuple{…}, Tuple{…}}, patch::@NamedTuple{data::DimPoints{…}, dims::Tuple{…}})
@ ConstructionBase C:\Users\T0185914\.julia\packages\ConstructionBase\3a7dg\src\ConstructionBase.jl:93
[5] rebuild(x::DimPoints{Tuple{…}, 2, Tuple{…}, Tuple{…}}; kw::@Kwargs{data::DimPoints{…}, dims::Tuple{…}})
@ DimensionalData.Dimensions.Lookups C:\Users\T0185914\.julia\packages\DimensionalData\FWnw9\src\Lookups\Lookups.jl:65
[6] _maybe_dimensional_broadcast(A::DimPoints{…}, dest_dims::Tuple{…}, options::Nothing)
@ DimensionalData C:\Users\T0185914\.julia\packages\DimensionalData\FWnw9\src\array\broadcast.jl:418
[7] top-level scope
@ REPL[9]:1
[8] macro expansion
@ C:\Users\T0185914\.julia\packages\DimensionalData\FWnw9\src\array\broadcast.jl:187 [inlined]
Some type information was truncated. Use `show(err)` to see complete types.julia> versioninfo()
Julia Version 1.12.2
Commit ca9b6662be (2025-11-20 16:25 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, tigerlake)
GC: Built with stock GC
Threads: 8 default, 1 interactive, 8 GC (on 16 virtual cores)
Environment:
JULIA_PKG_PRECOMPILE_AUTO = 0
JULIA_EDITOR = code
JULIA_VSCODE_REPL = 1
JULIA_NUM_THREADS = 8
pkg> status Rasters
[a3a2b9e3] Rasters v0.14.7rafaqz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working