dacapo.gp.dacapo_array_source

Classes

DaCapoArraySource

A DaCapo Array source node

Module Contents

class dacapo.gp.dacapo_array_source.DaCapoArraySource(array: dacapo.experiments.datasplits.datasets.arrays.Array, key: gunpowder.ArrayKey)

A DaCapo Array source node

array

The array to be served.

Type:

Array

key

The key of the array to be served.

Type:

gp.ArrayKey

setup()

Set up the provider.

provide(request)

Provides the array for the requested ROI.

Note

This class is a subclass of gunpowder.BatchProvider and is used to serve array data to gunpowder pipelines.

array
array_spec
key
setup()

Adds the key and the array spec to the provider.

Raises:

RuntimeError – If the key is already provided.

Examples

>>> array_source.setup()
provide(request)

Provides data based on the given request.

Parameters:

request (gp.BatchRequest) – The request for data

Returns:

The batch containing the provided data

Return type:

gp.Batch

Raises:

ValueError – If the input data contains NaN values

Examples

>>> array_source.provide(request)