store_probabilities¶
- store_probabilities(probabilities, chunk_shape, probabilities_zarr, probabilities_da, zarr_group, name='probabilities')[source]¶
Store computed probability data into a Zarr dataset or accumulate in memory.
If a Zarr group is provided, the function appends the given probability array to the ‘probabilities’ dataset, resizing as needed. Otherwise, it concatenates the array into an existing Dask array for in-memory accumulation.
- Parameters:
probabilities (np.ndarray) – Computed probability array to store.
chunk_shape (tuple[int, ...]) – Chunk shape used for Zarr dataset creation.
probabilities_zarr (zarr.Array | None) – Existing Zarr dataset, or None to initialize.
probabilities_da (da.Array | None) – Existing Dask array for in-memory accumulation.
zarr_group (zarr.Group | None) – Zarr group used to create or access the dataset.
name (str) – Name to create Zarr dataset.
- Returns:
Updated Zarr dataset and/or Dask array.
- Return type:
tuple[zarr.Array | None, da.Array | None]