From 2096332ee825e7a38d0737c3489e4f973f04de74 Mon Sep 17 00:00:00 2001 From: gong1 <b.gong@fz-juelich.de> Date: Mon, 7 Feb 2022 18:32:38 +0100 Subject: [PATCH] fix bug for preprocesss_data_setp2 related Datatime object in Line 221 --- .../data_preprocess/preprocess_data_step2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video_prediction_tools/data_preprocess/preprocess_data_step2.py b/video_prediction_tools/data_preprocess/preprocess_data_step2.py index a062ee1c..a197471b 100644 --- a/video_prediction_tools/data_preprocess/preprocess_data_step2.py +++ b/video_prediction_tools/data_preprocess/preprocess_data_step2.py @@ -218,7 +218,8 @@ class ERA5Pkl2Tfrecords(ERA5Dataset): X_end = X_start + self.sequence_length seq = X_train[X_start:X_end, ...] # recording the start point of the timestamps (already datetime-objects) - t_start = ERA5Pkl2Tfrecords.ensure_datetime(T_train[X_start][0]) + + t_start = ERA5Pkl2Tfrecords.ensure_datetime(T_train[X_start]) seq = list(np.array(seq).reshape((self.sequence_length, self.height, self.width, self.nvars))) if not sequences: last_start_sequence_iter = sequence_iter -- GitLab