From 5dc6b778d40da965f606ddaf20cde3b4045626cb Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Tue, 19 May 2026 23:16:23 +0800 Subject: [PATCH] refactor: simplify time step conversion --- .../schemas/thermal_model/input_profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transformer_thermal_model/schemas/thermal_model/input_profile.py b/transformer_thermal_model/schemas/thermal_model/input_profile.py index 82ae235..6df6e78 100644 --- a/transformer_thermal_model/schemas/thermal_model/input_profile.py +++ b/transformer_thermal_model/schemas/thermal_model/input_profile.py @@ -36,7 +36,7 @@ def time_step(self) -> np.ndarray: """ # Calculate time steps in minutes time_deltas = ( - np.diff(self.datetime_index, prepend=self.datetime_index[0]).astype("timedelta64[s]").astype(float) / 60 + np.diff(self.datetime_index, prepend=self.datetime_index[0]).astype("timedelta64[m]").astype(float) ) return time_deltas