diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 97de28f5c..f249293b0 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,12 +1,17 @@ # Change Logs +## 1.18.1 + +* Fix np.NAN into np.nan, + [#1148](https://github.com/onnx/sklearn-onnx/issues/1148) + ## 1.18.0 * Converter for OneHotEncoder does not add a concat operator if not needed, - [#1110](https://github.com/onnx/sklearn-onnx/pull/1110) + [#1110](https://github.com/onnx/sklearn-onnx/pull/1110) * Function ``to_onnx`` now forces the main opset to be equal to the value speficied by the user (parameter ``target_opset``), - [#1109](https://github.com/onnx/sklearn-onnx/pull/1109) + [#1109](https://github.com/onnx/sklearn-onnx/pull/1109) * Add converter for TunedThresholdClassifierCV, [#1107](https://github.com/onnx/sklearn-onnx/pull/1107) diff --git a/skl2onnx/operator_converters/power_transformer.py b/skl2onnx/operator_converters/power_transformer.py index 28440a275..c66b063f0 100644 --- a/skl2onnx/operator_converters/power_transformer.py +++ b/skl2onnx/operator_converters/power_transformer.py @@ -78,7 +78,7 @@ def convert_powertransformer( y_gr0 = OnnxImputer( y_gr0, imputed_value_floats=[0.0], - replaced_value_float=np.NAN, + replaced_value_float=getattr(np, "nan", getattr(np, "NAN")), op_version=opv, ) y_gr0 = OnnxMul(y_gr0, greater_mask, op_version=opv) @@ -104,7 +104,7 @@ def convert_powertransformer( y_le0 = OnnxImputer( y_le0, imputed_value_floats=[0.0], - replaced_value_float=np.NAN, + replaced_value_float=getattr(np, "nan", getattr(np, "NAN")), op_version=opv, ) y_le0 = OnnxMul(y_le0, less_mask, op_version=opv) @@ -130,7 +130,7 @@ def convert_powertransformer( y_gr0_l_eq0 = OnnxImputer( y_gr0_l_eq0, imputed_value_floats=[0.0], - replaced_value_float=np.NAN, + replaced_value_float=getattr(np, "nan", getattr(np, "NAN")), op_version=opv, ) y_gr0_l_eq0 = OnnxMul(y_gr0_l_eq0, lambda_zero_mask, op_version=opv)