From 34f4826c26143cb5537ddf37f9fa3aa340306a03 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Tue, 7 May 2024 21:31:18 +0200 Subject: [PATCH] Check consistency of `n_dates` and `ishape_last` --- Common/util_eddies.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Common/util_eddies.py b/Common/util_eddies.py index bb575604..5ccda718 100644 --- a/Common/util_eddies.py +++ b/Common/util_eddies.py @@ -137,6 +137,13 @@ class SHPC_class: if self._ishape_last[i_slice][orientation] is not None: assert self._ishape_last[i_slice][orientation].size != 0 + + if i_slice != self.n_slices - 1: + assert ( + self._ishape_last[i_slice][orientation].size + == self.n_dates[i_slice] + ) + self._e_max[i_slice][orientation] = np.ediff1d( self._ishape_last[i_slice][orientation], to_begin=self._ishape_last[i_slice][orientation][0] + 1, -- GitLab