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

Remove argument `i_slice` of `comp_ishape`

Since getting `i_slice` is now cheaper.
parent 74eafcad
No related branches found
No related tags found
No related merge requests found
......@@ -221,18 +221,15 @@ class SHPC_class:
assert date_index >= self.d_init[0]
return self._i_slice[date_index - self.d_init[0]]
def comp_ishape(self, date, eddy_index, orientation, i_slice=None):
def comp_ishape(self, date, eddy_index, orientation):
"""Compute the location in the shapefiles: return `(i_slice, ishape)`.
Compute i_slice if i_slice is None.
Returns None if ishape_last is None. Crashes if i_slice is not
None and date is not in i_slice. Returns None if eddy_index is
greater than the maximum value.
Returns None if ishape_last is None. Returns None if
eddy_index is greater than the maximum value.
"""
if i_slice is None:
i_slice = self.get_slice(date)
i_slice = self.get_slice(date)
ishape_last = self.get_ishape_last(i_slice, orientation)
......
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