-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
The chunks of a PermutedDimsArray of a chunked array is not chunked - this is really annoying for Rasters in particular, because the @d macro internally uses PermutedDimsArray
using Rasters, NCDatasets
import Rasters.DiskArrays: eachchunk
A = Rasters.create(
"myraster.nc", Float64, (X(1:1000), Y(1:1000));
force = true, chunks = (128, 128)
)
Aperm = @d A (Y, X)
eachchunk(Aperm) # 1×1 DiskArrays.GridChunks
eachchunk(A) # 8x8 DiskArrays.GridChunksOr a more minimal example
using DiskArrays
chunkedA = DiskArrays.TestTypes.ChunkedDiskArray(rand(100,100), (10, 10))
PermutedDimsArray(chunkedA, (2,1)) |> eachchunk
1×1 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
(1:100, 1:100)
I'm not entirely sure how this should work - probably we need to get the chunks of the parent and then apply the same permutation, right?
Metadata
Metadata
Assignees
Labels
No labels