Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 085ef8a

Browse files
Update nab.py (#167)
#line 87 gives TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Timedelta'. Co-authored-by: Tian Lan <31748898+Emerald01@users.noreply.github.com>
1 parent 032ae63 commit 085ef8a

File tree

1 file changed

+2
-2
lines changed
  • ts_datasets/ts_datasets/anomaly

1 file changed

+2
-2
lines changed

ts_datasets/ts_datasets/anomaly/nab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def __init__(self, subset="all", rootdir=None):
8383
if len(df["timestamp"][df["timestamp"].diff() == datetime.timedelta(0)]) != 0:
8484
df = df.drop_duplicates(subset="timestamp", keep="first")
8585
logger.warning(f"Time series {csv} (index {i}) has timestamp duplicates. Kept first values.")
86-
87-
all_dt = np.unique(np.diff(df["timestamp"])).astype(np.int64)
86+
87+
all_dt = np.unique(np.diff(df["timestamp"]))
8888
gcd_dt = all_dt[0]
8989
for dt in all_dt[1:]:
9090
gcd_dt = np.gcd(gcd_dt, dt)

0 commit comments

Comments
 (0)