Skip to content

Commit

Permalink
pep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aPovidlo committed Sep 5, 2023
1 parent 6daacc3 commit 8b41c3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fedot/core/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@ def get_not_encoded_data(self):
new_cat_idx = np.array([i for i in range(num_features_count, num_features_count + cat_features_count)])

if self.features_names is not None:
num_idx = [idx for idx, _ in enumerate(self.features_names) if not idx in self.categorical_idx]
num_idx = [idx for idx, _ in enumerate(self.features_names) if idx not in self.categorical_idx]
else:
self.features_names = [f'feature_{i}' for i in range(1, new_features.shape[1])]
num_idx = [idx for idx, _ in enumerate(self.features_names) if not idx in self.categorical_idx]
num_idx = [idx for idx, _ in enumerate(self.features_names) if idx not in self.categorical_idx]

num_features_name = self.features_names[num_idx].tolist()
cat_features_name = self.features_names[self.categorical_idx].tolist()
Expand Down Expand Up @@ -554,6 +554,7 @@ class OutputData(Data):
numerical_idx: np.ndarray = None
encoded_idx: np.ndarray = None


def _resize_image(file_path: str, target_size: Tuple[int, int]):
"""Function resizes and rewrites the input image
"""
Expand Down
2 changes: 1 addition & 1 deletion test/integration/models/test_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ def test_boosting_regression_operation():

assert isinstance(pipeline, Pipeline)
assert predicted_output.predict.shape[0] == n_samples * 0.2
assert metric < rmse_threshold
assert metric < rmse_threshold

0 comments on commit 8b41c3c

Please sign in to comment.