Skip to content

Commit

Permalink
Make tsfresh compatible with numpy 1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-braun committed May 1, 2023
1 parent 2e49614 commit f61a029
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests>=2.9.1
numpy >=1.15.1, <1.24
numpy >=1.15.1
pandas>=0.25.0
scipy>=1.2.0
statsmodels>=0.13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ def test_multilabel_target_on_request(self):
)

assert len(y.unique()) > 2
assert y.dtype == np.object
assert y.dtype == object
3 changes: 2 additions & 1 deletion tsfresh/feature_extraction/feature_calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

import numpy as np
import pandas as pd
import stumpy

# import stumpy
from numpy.linalg import LinAlgError
from scipy.signal import cwt, find_peaks_cwt, ricker, welch
from scipy.stats import linregress
Expand Down
2 changes: 1 addition & 1 deletion tsfresh/feature_selection/relevance.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def infer_ml_task(y):
:return: 'classification' or 'regression'
:rtype: str
"""
if y.dtype.kind in np.typecodes["AllInteger"] or y.dtype == np.object:
if y.dtype.kind in np.typecodes["AllInteger"] or y.dtype == object:
ml_task = "classification"
else:
ml_task = "regression"
Expand Down
2 changes: 1 addition & 1 deletion tsfresh/utilities/dataframe_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def roll_time_series(

df = df.sort_values(column_sort)

if df[column_sort].dtype != np.object:
if df[column_sort].dtype != object:
# if rolling is enabled, the data should be uniformly sampled in this column
# Build the differences between consecutive time sort values

Expand Down

0 comments on commit f61a029

Please sign in to comment.