Skip to content

Commit

Permalink
Fix np.NAN into np.nan (#1148)
Browse files Browse the repository at this point in the history
* Fix np.NAN into np.nan

Signed-off-by: xadupre <[email protected]>

* fix .

Signed-off-by: xadupre <[email protected]>

---------

Signed-off-by: xadupre <[email protected]>
  • Loading branch information
xadupre authored Dec 20, 2024
1 parent f41ffd8 commit 1399f55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
6 changes: 3 additions & 3 deletions skl2onnx/operator_converters/power_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 1399f55

Please sign in to comment.