From 9df159c290b7d9b7c2f3467168d953088cd0fa88 Mon Sep 17 00:00:00 2001 From: Ross Jennings Date: Tue, 5 Dec 2023 12:40:40 -0500 Subject: [PATCH] Time: cast offset to array for easier slicing --- cycspec_simulator/time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cycspec_simulator/time.py b/cycspec_simulator/time.py index 55e8de3..2806c26 100644 --- a/cycspec_simulator/time.py +++ b/cycspec_simulator/time.py @@ -63,7 +63,7 @@ def __init__(self, mjd, second, offset): raise ValueError(f"Second {second} is beyond end of day {mjd}") self.mjd = mjd self.second = second - self.offset = offset + self.offset = np.asanyarray(offset) def __getitem__(self, sl): return Time(self.mjd, self.second, self.offset[sl])