Skip to content

Commit

Permalink
Update DimensionalDataDiskArraysExt.jl (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored Nov 27, 2024
1 parent 78ae6a5 commit b55efd6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ext/DimensionalDataDiskArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ using DimensionalData
import DimensionalData: AbstractBasicDimArray
import DiskArrays

DiskArrays.cache(x::Union{AbstractDimStack,AbstractDimArray}; kw...) =
modify(A -> DiskArrays.cache(A; kw...), x)
# cache was only introduced in DiskArrays v0.4, so
# we lock out the method definition if the method does
# not exist.
@static if :cache in names(DiskArrays)
DiskArrays.cache(x::Union{AbstractDimStack,AbstractDimArray}; kw...) =
modify(A -> DiskArrays.cache(A; kw...), x)
end

DiskArrays.haschunks(da::AbstractBasicDimArray) = DiskArrays.haschunks(parent(da))
DiskArrays.eachchunk(da::AbstractBasicDimArray) = DiskArrays.eachchunk(parent(da))
Expand Down

0 comments on commit b55efd6

Please sign in to comment.