mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-12 15:37:45 +08:00
Enriches message returned for test batch transform.
Adds formatting of the failing values when ReturnPriceBatchTransform's data shape does not match the window_length.
This commit is contained in:
@@ -237,7 +237,9 @@ class TestRegisterTransformAlgorithm(TradingAlgorithm):
|
||||
|
||||
class ReturnPriceBatchTransform(BatchTransform):
|
||||
def get_value(self, data):
|
||||
assert data.shape[1] == self.window_length
|
||||
assert data.shape[1] == self.window_length, \
|
||||
"data shape={0} does not equal window_length={1} for data={2}".\
|
||||
format(data.shape[1], self.window_length, data)
|
||||
return data.price
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user