Skip to content

Commit

Permalink
use iclip
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Goldbaum committed Oct 10, 2018
1 parent d549330 commit 3dae4be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt/geometry/selection_routines.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,8 @@ cdef class SliceSelector(SelectorObject):
(self.coord - gobj.LeftEdge.d[i])/gobj.dds[i])
# clip coordinate to avoid seg fault below if we're
# exactly at a grid boundary
icoord = min(icoord, gobj.ActiveDimensions[i]-1)
ind[i][0] = max(icoord, 0)
ind[i][0] = iclip(
icoord, 0, gobj.ActiveDimensions[i]-1)
ind[i][1] = ind[i][0] + 1
else:
ind[i][0] = 0
Expand Down

0 comments on commit 3dae4be

Please sign in to comment.