Skip to content

Commit

Permalink
Removed NoneType from code
Browse files Browse the repository at this point in the history
NoneType is no longer directly importable in newer versions of python
  • Loading branch information
gAldeia authored Feb 19, 2024
1 parent caa13ba commit 81f3b6f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/brush/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# import deap as dp
from deap import algorithms, base, creator, tools
# from tqdm import tqdm
from types import NoneType
from sklearn.metrics import average_precision_score
from sklearn.preprocessing import MinMaxScaler
import _brush
Expand Down Expand Up @@ -404,7 +403,7 @@ def _make_data(self, X, y=None, feature_names=[], validation_size=0.0):

assert isinstance(X, np.ndarray)

if isinstance(y, NoneType):
if isinstance(y, None):
return _brush.Dataset(X=X,
feature_names=feature_names, validation_size=validation_size)

Expand Down Expand Up @@ -605,4 +604,4 @@ def _make_individual(self):

# def transform(self, X):
# """Transform X using the best estimator in the archive. """
# return self.predict(X)
# return self.predict(X)

0 comments on commit 81f3b6f

Please sign in to comment.