Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh13 committed Jan 4, 2024
1 parent 03100c5 commit 6c37031
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hexrd/matrixutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ def findDuplicateVectors_old(vec, tol=vTol, equivPM=False):
return eqv, uid

def findDuplicateVectors(vec, tol=vTol, equivPM=False):

eqv = _findduplicatevectors(vec, tol, equivPM)
uid = np.arange(0, vec.shape[1], dtype=np.int64)
idx = eqv[~np.isnan(eqv)].astype(np.int64)
Expand All @@ -697,6 +696,7 @@ def findDuplicateVectors(vec, tol=vTol, equivPM=False):
eqv2.append([ii] + list(v.astype(np.int64)))
return eqv2, uid2


@numba_njit_if_available(cache=True, nogil=True, parallel=True)
def _findduplicatevectors(vec, tol, equivPM):
"""
Expand Down Expand Up @@ -739,7 +739,8 @@ def _findduplicatevectors(vec, tol, equivPM):
if equivPM:
vec2 = np.abs(vec.copy())

n = vec.shape[0]; m = vec.shape[1]
n = vec.shape[0]
m = vec.shape[1]

eqv = np.zeros((m, m), dtype=np.float64)
eqv[:] = np.nan
Expand All @@ -752,9 +753,9 @@ def _findduplicatevectors(vec, tol, equivPM):
if jj > ii:

if equivPM:
diff = np.sum(np.abs(vec[:,ii]-vec2[:,jj]))
diff = np.sum(np.abs(vec[:, ii]-vec2[:, jj]))
else:
diff = np.sum(np.abs(vec[:,ii]-vec[:,jj]))
diff = np.sum(np.abs(vec[:, ii]-vec[:, jj]))

if diff < tol:
eqv_elem[ctr] = jj
Expand Down

0 comments on commit 6c37031

Please sign in to comment.