Skip to content
Snippets Groups Projects
Commit 34f4826c authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Check consistency of `n_dates` and `ishape_last`

parent 0d63255c
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,13 @@ class SHPC_class: ...@@ -137,6 +137,13 @@ class SHPC_class:
if self._ishape_last[i_slice][orientation] is not None: if self._ishape_last[i_slice][orientation] is not None:
assert self._ishape_last[i_slice][orientation].size != 0 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._e_max[i_slice][orientation] = np.ediff1d(
self._ishape_last[i_slice][orientation], self._ishape_last[i_slice][orientation],
to_begin=self._ishape_last[i_slice][orientation][0] + 1, to_begin=self._ishape_last[i_slice][orientation][0] + 1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment