Skip to content

Commit

Permalink
Expanded commit 7b37433
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Jan 7, 2024
1 parent 7b37433 commit f97bf9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sklearn2pmml/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def __init__(self, dtype):

def fit(self, X, y = None):
if self.dtype == "category":
X = to_numpy(X)
nonmissing_mask = pandas.notnull(X)
categories = numpy.unique(X[nonmissing_mask])
self.dtype_ = CategoricalDtype(categories, ordered = False)
Expand Down

0 comments on commit f97bf9c

Please sign in to comment.