mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-09 11:19:23 +08:00
MAINT: Don't alias bounds in engine loop.
This commit is contained in:
@@ -464,13 +464,13 @@ class SimpleFFCEngine(object):
|
|||||||
bounds = add.accumulate(unioned.sum(axis=1))
|
bounds = add.accumulate(unioned.sum(axis=1))
|
||||||
for dt_idx, dt_end in enumerate(bounds):
|
for dt_idx, dt_end in enumerate(bounds):
|
||||||
|
|
||||||
bounds = slice(dt_start, dt_end)
|
row_bounds = slice(dt_start, dt_end)
|
||||||
column_indices = nonzero_ys[bounds]
|
column_indices = nonzero_ys[row_bounds]
|
||||||
|
|
||||||
raw_dates_index[bounds] = dates[dt_idx]
|
raw_dates_index[row_bounds] = dates[dt_idx]
|
||||||
raw_assets_index[bounds] = assets[column_indices]
|
raw_assets_index[row_bounds] = assets[column_indices]
|
||||||
for computed, output in zip(factor_data, factor_outputs):
|
for computed, output in zip(factor_data, factor_outputs):
|
||||||
output[bounds] = computed[dt_idx, column_indices]
|
output[row_bounds] = computed[dt_idx, column_indices]
|
||||||
|
|
||||||
# Upper bound of current row becomes lower bound for next row.
|
# Upper bound of current row becomes lower bound for next row.
|
||||||
dt_start = dt_end
|
dt_start = dt_end
|
||||||
|
|||||||
Reference in New Issue
Block a user