Skip to content

Commit

Permalink
inf condition simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
IIaKyJIuH committed Jul 31, 2023
1 parent a4f23d1 commit 9f39d7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fedot/core/data/data_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def data_type_is_suitable_for_preprocessing(data: InputData) -> bool:

def replace_inf_with_nans(input_data: InputData):
features = input_data.features
is_inf = (features == np.inf) | (features == -np.inf)
is_inf = np.isin(features, [np.inf, -np.inf])
if np.any(is_inf):
features[is_inf] = np.nan

Expand Down

0 comments on commit 9f39d7b

Please sign in to comment.