Skip to content

Commit

Permalink
Use nan mask only once.
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh13 committed Jan 4, 2024
1 parent 3331899 commit 3c31131
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hexrd/matrixutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,9 @@ def findDuplicateVectors_numba(vec, tol=vTol, equivPM=False):
idx = eqv[~np.isnan(eqv)].astype(np.int64)
uid2 = list(np.delete(uid, idx))
eqv2 = []
mask = ~np.isnan(eqv)
for ii in range(eqv.shape[1]):
v = eqv[ii, ~np.isnan(eqv[ii, :])]
v = eqv[ii, mask[ii, :]]
if v.shape[0] > 0:
eqv2.append([ii] + list(v.astype(np.int64)))
return eqv2, uid2
Expand Down

0 comments on commit 3c31131

Please sign in to comment.