Skip to content

Commit

Permalink
Merge pull request #135 from fraunhoferportugal/bugfix/numpy-bool-dep…
Browse files Browse the repository at this point in the history
…recation

Replace 'np.bool' for 'bool' in correlated_features function
  • Loading branch information
mbarandas committed Aug 21, 2023
2 parents 1d05e21 + 87edb08 commit e6fcb47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsfel/utils/signal_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def correlated_features(features, threshold=0.95):
"""
corr_matrix = features.corr()
# Select upper triangle of correlation matrix
upper = corr_matrix.where(np.triu(np.ones(corr_matrix.shape), k=1).astype(np.bool))
upper = corr_matrix.where(np.triu(np.ones(corr_matrix.shape), k=1).astype(bool))
# Find index and column name of features with correlation greater than 0.95
to_drop = [column for column in upper.columns if any(upper[column] > threshold)]

Expand Down

0 comments on commit e6fcb47

Please sign in to comment.