Skip to content

Commit f4253c2

Browse files
replace caxes by dims (#466)
* replace caxes by dims * collect * Only replace caxes by dims for AbstractDimArray * Reenable fallback caxes --------- Co-authored-by: Felix Cremer <[email protected]>
1 parent 19db33d commit f4253c2

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/Cubes/Cubes.jl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,18 @@ function DD.rebuild(A::YAXArray; data=parent(A), dims=DD.dims(A), metadata=DD.me
205205
end
206206

207207
function caxes(x)
208-
#@show x
209-
#@show typeof(x)
210-
dims = map(enumerate(dimnames(x))) do a
211-
index, symbol = a
212-
values = YAXArrayBase.dimvals(x, index)
213-
DD.Dim{symbol}(values)
214-
end
215-
(dims... ,)
208+
#@show x
209+
#@show typeof(x)
210+
dims = map(enumerate(dimnames(x))) do a
211+
index, symbol = a
212+
values = YAXArrayBase.dimvals(x, index)
213+
DD.Dim{symbol}(values)
214+
end
215+
(dims... ,)
216216
end
217+
218+
caxes(x::DD.AbstractDimArray) = collect(DD.dims(x))
219+
217220
caxes(c::YAXArray) = getfield(c, :axes)
218221
"""
219222
caxes

0 commit comments

Comments
 (0)