mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-24 13:00:57 +08:00
22 lines
613 B
Python
22 lines
613 B
Python
"""
|
|
Loaders for zipline.pipeline.data.testing datasets.
|
|
"""
|
|
from .synthetic import EyeLoader, SeededRandomLoader
|
|
from ..data.testing import TestingDataSet
|
|
|
|
|
|
def make_eye_loader(dates, sids):
|
|
"""
|
|
Make a PipelineLoader that emits np.eye arrays for the columns in
|
|
``TestingDataSet``.
|
|
"""
|
|
return EyeLoader(TestingDataSet.columns, dates, sids)
|
|
|
|
|
|
def make_seeded_random_loader(seed, dates, sids):
|
|
"""
|
|
Make a PipelineLoader that emits random arrays seeded with `seed` for the
|
|
columns in ``TestingDataSet``.
|
|
"""
|
|
return SeededRandomLoader(seed, TestingDataSet.columns, dates, sids)
|