-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) * Add a DiskArrays extension to DimensionalData * Implement `cache`, `haschunks`, `eachchunk` for DimArrays basically everything forwards to the parent array, and `chunk` rebuilds the dimarray with the cached parent. * Add tests * Fix tests * Add docs * Update ext/DimensionalDataDiskArraysExt.jl Co-authored-by: Rafael Schouten <[email protected]> * Update ext/DimensionalDataDiskArraysExt.jl * Update ext/DimensionalDataDiskArraysExt.jl --------- Co-authored-by: Rafael Schouten <[email protected]>
- Loading branch information
1 parent
b39c4fc
commit b73b6ee
Showing
4 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
DimensionalDataDiskArraysExt | ||
Extend some methods of DiskArrays (`cache`, etc) to work on the base data of any DimArray. | ||
""" | ||
module DimensionalDataDiskArraysExt | ||
|
||
using DimensionalData | ||
import DimensionalData: AbstractBasicDimArray | ||
import DiskArrays | ||
|
||
DiskArrays.cache(x::Union{AbstractDimStack,AbstractDimArray}; kw...) = | ||
modify(A -> DiskArrays.cache(A; kw...), x) | ||
|
||
DiskArrays.haschunks(da::AbstractBasicDimArray) = DiskArrays.haschunks(parent(da)) | ||
DiskArrays.eachchunk(da::AbstractBasicDimArray) = DiskArrays.eachchunk(parent(da)) | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters