Skip to content

Commit

Permalink
Make Metadata a typeparameter of YAXArrays
Browse files Browse the repository at this point in the history
This is similar to how DimArray handles that and allows to use DD Metadata types.
  • Loading branch information
felixcremer committed Feb 22, 2024
1 parent 4fcfeaf commit 08b7b19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cubes/Cubes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ It can wrap normal arrays or, more typically DiskArrays.
$(FIELDS)
"""
struct YAXArray{T,N,A<:AbstractArray{T,N}, D} <: AbstractDimArray{T,N,D,A}
struct YAXArray{T,N,A<:AbstractArray{T,N}, D, Me} <: AbstractDimArray{T,N,D,A}
"`Tuple` of Dimensions containing the Axes of the Cube"
axes::D
"length(axes)-dimensional array which holds the data, this can be a lazy DiskArray"
data::A
"Metadata properties describing the content of the data"
properties::Dict{String}
properties::Me
"Representation of the chunking of the data"
chunks::GridChunks{N}
"Cleaner objects to track which objects to tidy up when the YAXArray goes out of scope"
Expand All @@ -120,7 +120,7 @@ struct YAXArray{T,N,A<:AbstractArray{T,N}, D} <: AbstractDimArray{T,N,D,A}
throw(ArgumentError("Can not construct YAXArray, supplied chunk dimension is $(ndims(chunks)) while the number of dims is $(length(axes))"))
else
axes = DD.format(axes, data)
return new{eltype(data),ndims(data),typeof(data),typeof(axes)}(
return new{eltype(data),ndims(data),typeof(data),typeof(axes), typeof(properties)}(
axes,
data,
properties,
Expand Down

0 comments on commit 08b7b19

Please sign in to comment.