caterva2.fetch#

caterva2.fetch(dataset, host='localhost:8002', slice_=None, prefer_schunk=True)#

Fetch a slice of a dataset.

Parameters:
  • dataset (str) – The name of the dataset.

  • host (str) – The host to query.

  • slice_ (str) – The slice to fetch.

  • prefer_schunk (bool) – Whether to prefer using Blosc2 schunk serialization during data transport. If False, pickle will always be used instead. Default is True, so Blosc2 serialization will be used if Blosc2 is installed (and data payload is large enough).

Returns:

The slice of the dataset.

Return type:

numpy.ndarray