dacapo.gp.product
Classes
A BatchFilter that multiplies two input arrays and produces an output array. |
Module Contents
- class dacapo.gp.product.Product(x1_key: gunpowder.ArrayKey, x2_key: gunpowder.ArrayKey, y_key: gunpowder.ArrayKey)
A BatchFilter that multiplies two input arrays and produces an output array.
- x1_key
The key of the first input array.
- Type:
ArrayKey
- x2_key
The key of the second input array.
- Type:
ArrayKey
- y_key
The key of the output array.
- Type:
ArrayKey
- Provides:
y_key (gp.ArrayKey): The key of the output array.
- Method:
__init__: Initialize the Product BatchFilter. setup: Set up the Product BatchFilter. prepare: Prepare the Product BatchFilter. process: Process the Product BatchFilter.
- x1_key
- x2_key
- y_key
- setup()
Set up the Product BatchFilter.
Enables autoskip and specifies the output array.
- Raises:
AssertionError – If the input arrays are not provided.
Examples
>>> setup() setup()
- prepare(request)
Prepare the Product BatchFilter.
- Parameters:
request (gp.BatchRequest) – The batch request.
- Returns:
The dependencies.
- Return type:
gp.BatchRequest
- Raises:
AssertionError – If the input arrays are not provided.
Examples
>>> prepare(request) prepare(request)
- process(batch, request)
Process the Product BatchFilter.
- Parameters:
batch (gp.Batch) – The input batch.
request (gp.BatchRequest) – The batch request.
- Returns:
The output batch.
- Return type:
gp.Batch
- Raises:
AssertionError – If the input arrays are not provided.
Examples
>>> process(batch, request) process(batch, request)