dacapo.gp.product
Module Contents
Classes
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()orupdates()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
BatchRequestof 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 aBatchcontaining 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.requestis the same as passed toprepare(), 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.