blosc2.save#

blosc2.save(array: NDArray, urlpath: str, contiguous=True, **kwargs: Any) None#

Save an array to a file.

Parameters:
  • array (NDArray) – The array to be saved.

  • urlpath (str) – The path to the file where the array will be saved.

  • contiguous (bool, optional) – Whether to store the array contiguously.

  • kwargs (dict, optional) – Keyword arguments that are supported by the save() method.

Examples

>>> import blosc2
>>> import numpy as np
>>> # Create an array
>>> array = np.arange(0, 100, dtype=np.int64).reshape(10, 10)
>>> # Save the array to a file
>>> blosc2.save(array, "array.b2")