Commit bbee3fc7 authored by Dr.李's avatar Dr.李

remove dependency on pyfin in tests

parent b17ff59f
......@@ -10,7 +10,6 @@ import numpy as np
from distutils.version import LooseVersion
from sklearn import __version__ as sklearn_version
from sklearn.linear_model import LinearRegression as LinearRegressionImpl
from PyFin.api import pyFinAssert
from alphamind.model.modelbase import ModelBase
from alphamind.utilities import alpha_logger
......@@ -22,7 +21,7 @@ class ConstLinearModel(ModelBase):
weights: np.ndarray=None):
super().__init__(features)
if features is not None and weights is not None:
pyFinAssert(len(features) == len(weights), ValueError, "length of features is not equal to length of weights")
assert len(features) == len(weights), "length of features is not equal to length of weights"
self.weights = np.array(weights).flatten()
def fit(self, x: np.ndarray, y: np.ndarray):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment