ewoksdata.data.hdf5.config.guess_chunk_shape

ewoksdata.data.hdf5.config.guess_chunk_shape(data_shape, dtype, chunk_split=None, chunk_nbytes=None)[source]

Try to guess the optimal chunk shape with these constraints: * Split any dimension for partial access * Below the maximal chunk size (1 MB by default, uncompressed)

The inner-most dimensions are split in chunk_split parts until chunk_nbytes is reached. The chunk size in the outer dimensions will be 1, unless the data size is too small.

Parameters:
  • data_shape (Tuple[NewType()(StrictPositiveIntegral, Integral)]) –

  • dtype (Union[dtype[Any], None, Type[Any], _SupportsDType[dtype[Any]], str, Tuple[Any, int], Tuple[Any, Union[SupportsIndex, Sequence[SupportsIndex]]], List[Any], _DTypeDict, Tuple[Any, Any]]) –

  • chunk_split (Optional[Integral]) –

  • chunk_nbytes (Optional[Integral]) –

Return type:

Optional[Tuple[NewType()(StrictPositiveIntegral, Integral)]]