Open asinghvi17 opened 1 week ago
Ok yes At
totally lets you use a dimension as val
We could make that error as it will always be a mistake?
Yeah that would be good, maybe in the constructor then?
Yes I think that would make sense. I played around a bit and am wondering why this is not throwing an error, but returning the full array:
julia> dd = DimArray(1:3, X([X,Y,Z ]))
╭─────────────────────────────╮
│ 3-element DimArray{Int64,1} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ X Sampled{UnionAll} [X, Y, Z] Unordered Irregular Points
└──────────────────────────────────────────────────────────────────────────────┘
X 1
Y 2
Z 3
julia> dd[X=Y]
╭─────────────────────────────╮
│ 3-element DimArray{Int64,1} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ X Sampled{UnionAll} [X, Y, Z] Unordered Irregular Points
└──────────────────────────────────────────────────────────────────────────────┘
X 1
Y 2
Z 3
This is pretty inscrutable, but I'm not sure where the best place to intercept this is.