@@ -200,7 +200,7 @@ def reset_start_point(self, xg, yg):
200200 self .mask ._current_xy = (xm , ym )
201201
202202 def update_trajectory (self , xg , yg ):
203- if not self .grid .valid_index (xg , yg ):
203+ if not self .grid .within_grid (xg , yg ):
204204 raise InvalidIndexError
205205 xm , ym = self .grid2mask (xg , yg )
206206 self .mask ._update_trajectory (xm , ym )
@@ -243,7 +243,7 @@ def __init__(self, x, y):
243243 def shape (self ):
244244 return self .ny , self .nx
245245
246- def valid_index (self , xi , yi ):
246+ def within_grid (self , xi , yi ):
247247 """Return True if point is a valid index of grid."""
248248 # Note that xi/yi can be floats; so, for example, we can't simply check
249249 # `xi < self.nx` since `xi` can be `self.nx - 1 < xi < self.nx`
@@ -402,7 +402,7 @@ def _integrate_rk12(x0, y0, dmap, f):
402402 xf_traj = []
403403 yf_traj = []
404404
405- while dmap .grid .valid_index (xi , yi ):
405+ while dmap .grid .within_grid (xi , yi ):
406406 xf_traj .append (xi )
407407 yf_traj .append (yi )
408408 try :
0 commit comments