iarray.partition_advice#

iarray.partition_advice(shape, min_chunksize=0, max_chunksize=0, min_blocksize=0, max_blocksize=0, cfg=None)#

Provide advice for the chunk and block shapes for a certain dtshape.

Parameters
  • shape (Sequence) – The shape of the array.

  • min_chunksize (int) – Minimum value for chunksize (in bytes). If 0 (default), a sensible value is chosen.

  • max_chunksize (int) – Maximum value for chunksize (in bytes). If 0 (default), a sensible value is chosen.

  • min_bloksize (int) – Minimum value for blocksize (in bytes). If 0 (default), a sensible value is chosen.

  • max_bloksize (int) – Maximum value for blocksize (in bytes). If 0 (default), a sensible value is chosen.

  • cfg (Config) – A configuration. If None, the global configuration is used.

Returns

If success, a (chunks, blocks) containing the advice is returned. In case of error, a (None, None) is returned and a warning is issued.

Return type

tuple