1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00

fix cant find ops error on Windows

This commit is contained in:
bxdd
2020-12-23 16:39:17 +00:00
parent 53f501ac19
commit b11712fa54

View File

@@ -60,11 +60,11 @@ class Distance(PairOperator):
series_right = self.feature_right.load(instrument, start_index, end_index, freq)
return np.abs(series_left - series_right)
OpsList = [Diff, Distance]
Operators.register(OpsList)
class TestRegiterCustomOps(TestAutoData):
def test_regiter_custom_ops(self):
OpsList = [Diff, Distance]
Operators.register(OpsList)
instruments = ["SH600000"]
fields = ["Diff($close)", "Distance($close, Ref($close, 1))"]
print(D.features(instruments, fields, start_time="2010-01-01", end_time="2017-12-31", freq="day"))