dacapo.gp.product

Module Contents

Classes

Product

multiplies two arrays

class dacapo.gp.product.Product(x1_key: gunpowder.ArrayKey, x2_key: gunpowder.ArrayKey, y_key: gunpowder.ArrayKey)

multiplies two arrays

setup()

To be implemented in subclasses.

Called during initialization of the DAG. Callees can assume that all upstream providers are set up already.

In setup, call provides() or updates() to announce the arrays and points provided or changed by this node.

prepare(request)

To be implemented in subclasses.

Prepare for a batch request. Should return a BatchRequest of needed dependencies. If None is returned, it will be assumed that all of request is needed.

process(batch, request)

To be implemented in subclasses.

Filter a batch, will be called after prepare(). Should return a Batch containing modified Arrays and Graphs. Keys in the returned batch will replace the associated data in the original batch. If None is returned it is assumed that the batch has been modified in place. request is the same as passed to prepare(), provided for convenience.

Parameters:
  • batch (Batch) – The batch received from upstream to be modified by this node.

  • request (BatchRequest) – The request this node received. The updated batch should meet this request.