From d2f7a283f61c5d799264c61931bbe9bb320bf065 Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Tue, 5 Dec 2023 16:08:39 +0200 Subject: [PATCH] Optimized 'Domain._valid_value_mask(X, where)' method --- sklearn2pmml/decoration/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sklearn2pmml/decoration/__init__.py b/sklearn2pmml/decoration/__init__.py index a30cbfe..5474391 100644 --- a/sklearn2pmml/decoration/__init__.py +++ b/sklearn2pmml/decoration/__init__.py @@ -115,8 +115,7 @@ def is_missing(X, missing_value): return pandas.isnull(X) def _valid_value_mask(self, X, where): - mask = numpy.full(X.shape, True, dtype = bool) - return numpy.logical_and(mask, where) + return where def _transform_missing_values(self, X, where): if self.missing_value_treatment == "return_invalid":