Skip to content

Commit

Permalink
Update hexrd/gridutil.py
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Avery <[email protected]>
  • Loading branch information
saransh13 and psavery authored Nov 15, 2024
1 parent 2b3e4d3 commit c73a96e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hexrd/gridutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ def cellIndices(edges, points_1d):
# idx[off_lo] = np.nan
# if np.any(off_hi):
# idx[off_hi] = np.nan
idx = np.array(idx)
idx[np.isnan(idx)] = 0
return np.array(idx).astype(int)
idx[np.isnan(idx)] = -1
return idx.astype(int)


@numba.njit(nogil=True, cache=True)
Expand Down

0 comments on commit c73a96e

Please sign in to comment.