diff --git a/src/axisarrays/dimensionaldata.jl b/src/axisarrays/dimensionaldata.jl index 117ec75..22431c7 100644 --- a/src/axisarrays/dimensionaldata.jl +++ b/src/axisarrays/dimensionaldata.jl @@ -1,18 +1,18 @@ -using .DimensionalData: DimensionalArray, DimensionalData, data, Dim, metadata +using .DimensionalData: DimArray, DimensionalData, data, Dim, metadata _dname(::DimensionalData.Dim{N}) where N = N -dimname(x::DimensionalArray, i) = _dname(DimensionalData.dims(x)[i]) +dimname(x::DimArray, i) = _dname(DimensionalData.dims(x)[i]) -dimvals(x::DimensionalArray,i) = DimensionalData.dims(x)[i].val +dimvals(x::DimArray,i) = DimensionalData.dims(x)[i].val -getdata(x::DimensionalArray) = data(x) +getdata(x::DimArray) = data(x) -getattributes(x::DimensionalArray) = metadata(x) +getattributes(x::DimArray) = metadata(x) -function yaxcreate(::Type{<:DimensionalArray},data,dnames,dvals,atts) +function yaxcreate(::Type{<:DimArray},data,dnames,dvals,atts) d = ntuple(ndims(data)) do i Dim{Symbol(dnames[i])}(dvals[i]) end - DimensionalArray(data,d,metadata = atts) + DimArray(data,d,metadata = atts) end diff --git a/test/arrays.jl b/test/arrays.jl index 8b1984b..82de989 100644 --- a/test/arrays.jl +++ b/test/arrays.jl @@ -58,8 +58,8 @@ end @testset "DimensionalData" begin using DimensionalData - d = yaxconvert(DimensionalArray,M()) - @test d isa DimensionalArray + d = yaxconvert(DimArray,M()) + @test d isa DimArray @test getdata(d) == reshape(1:12,3,4) @test YAXArrayBase.dimnames(d) == (:x, :y) @test dimvals(d,1) == 0.5:1.0:2.5