cf.Bounds.rechunk¶
- Bounds.rechunk(*args, **kwargs)[source]¶
- Change the chunk structure of the data. - Added in version 3.14.0. - See also - Parameters:
- chunks: int,tuple,dictorstr, optional
- Specify the chunking of the underlying dask array. - Any value accepted by the chunks parameter of the - dask.array.from_arrayfunction is allowed.- By default, - "auto"is used to specify the array chunking, which uses a chunk size in bytes defined by the- cf.chunksizefunction, preferring square-like chunk shapes.- Parameter example:
- A blocksize like - 1000.
- Parameter example:
- A blockshape like - (1000, 1000).
- Parameter example:
- Explicit sizes of all blocks along all dimensions like - ((1000, 1000, 500), (400, 400)).
- Parameter example:
- A size in bytes, like - "100MiB"which will choose a uniform block-like shape, preferring square-like chunk shapes.
- Parameter example:
- A blocksize of - -1or- Nonein a tuple or dictionary indicates the size of the corresponding dimension.
- Parameter example:
- Blocksizes of some or all dimensions mapped to dimension positions, like - {1: 200}, or- {0: -1, 1: (400, 400)}.
 
- threshold: int, optional
- The graph growth factor under which we don’t bother introducing an intermediate step. See - dask.array.rechunkfor details.
- block_size_limit: int, optional
- The maximum block size (in bytes) we want to produce, as defined by the - cf.chunksizefunction.
- balance: bool, optional
- If True, try to make each chunk the same size. By default this is not attempted. - This means - balance=Truewill remove any small leftover chunks, so using- d.rechunk(chunks=len(d) // N, balance=True)will almost certainly result in- Nchunks.
 
- chunks: 
- Returns:
 - Examples - See - cf.Data.rechunkfor examples.
 
 
 
