Skip to content

Commit

Permalink
Fixed the build
Browse files Browse the repository at this point in the history
The pandas.isnull(x) function works fine with Numpy matrices in
Pandas 1.5(.2), but fails in Pandas 1.3(.5).
  • Loading branch information
vruusmann committed Oct 23, 2023
1 parent fbd8561 commit eb63c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn2pmml/preprocessing/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_transform_object(self):
transformer = MultiLookupTransformer(mapping, None)
X = DataFrame([["one", None], ["one", True], [None, True], ["two", True], ["three", True]])
self.assertEqual([[None], ["ein"], [None], ["zwei"], ["drei"]], transformer.transform(X).tolist())
X = numpy.matrix([["one", True], ["one", None], ["one", False], ["two", True]], dtype = "O")
X = numpy.array([["one", True], ["one", None], ["one", False], ["two", True]], dtype = "O")
self.assertEqual([["ein"], [None], [None], ["zwei"]], transformer.transform(X).tolist())
transformer = MultiLookupTransformer(mapping, "(other)")
self.assertEqual([["ein"], [None], ["(other)"], ["zwei"]], transformer.transform(X).tolist())
Expand Down

0 comments on commit eb63c40

Please sign in to comment.