Skip to content

Commit c73a96e

Browse files
saransh13psavery
andauthored
Update hexrd/gridutil.py
Co-authored-by: Patrick Avery <[email protected]>
1 parent 2b3e4d3 commit c73a96e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hexrd/gridutil.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ def cellIndices(edges, points_1d):
8787
# idx[off_lo] = np.nan
8888
# if np.any(off_hi):
8989
# idx[off_hi] = np.nan
90-
idx = np.array(idx)
91-
idx[np.isnan(idx)] = 0
92-
return np.array(idx).astype(int)
90+
idx[np.isnan(idx)] = -1
91+
return idx.astype(int)
9392

9493

9594
@numba.njit(nogil=True, cache=True)

0 commit comments

Comments
 (0)