Forráskód Böngészése

fixed np.ndarray type definition

tanja 4 éve
szülő
commit
5f4b840d52
1 módosított fájl, 4 hozzáadás és 4 törlés
  1. 4 4
      cdplib/pipeline_selector/PipelineSelector.py

+ 4 - 4
cdplib/pipeline_selector/PipelineSelector.py

@@ -237,11 +237,11 @@ class PipelineSelector(ABC):
 
         if cv is None:
             try:
-                assert(isinstance(X_train, (pd.DataFrame, np.array)) and
-                       isinstance(X_val, (pd.DataFrame, np.array)) and
-                       isinstance(y_train, (pd.Series, np.array,
+                assert(isinstance(X_train, (pd.DataFrame, np.ndarray)) and
+                       isinstance(X_val, (pd.DataFrame, np.ndarray)) and
+                       isinstance(y_train, (pd.Series, np.ndarray,
                                             pd.DataFrame, NoneType)) and
-                       isinstance(y_val, (pd.Series, np.array)) and
+                       isinstance(y_val, (pd.Series, np.ndarray)) and
                        ((y_val is None) if (y_train is None)
                         else (y_val is not None)))
             except AssertionError: