Skip to content

Commit

Permalink
Merge pull request #568 from HEXRD/remove-numpy-dual
Browse files Browse the repository at this point in the history
Remove use of numpy.dual
  • Loading branch information
psavery authored Oct 18, 2023
2 parents 77923b1 + f502cd7 commit fffb864
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hexrd/xrdutil/phutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from concurrent.futures import ThreadPoolExecutor

import numpy as np
import numpy.dual

from hexrd import constants as ct
from hexrd.instrument import Detector
Expand Down Expand Up @@ -366,9 +365,9 @@ def azimuth(vv, v0, v1):
"""
with np.errstate(divide='ignore', invalid='ignore'):
n0 = np.cross(v0, v1)
n0 /= np.dual.norm(n0, axis=-1)[..., np.newaxis]
n0 /= np.linalg.norm(n0, axis=-1)[..., np.newaxis]
nn = np.cross(v0, vv)
nn /= np.dual.norm(nn, axis=-1)[..., np.newaxis]
nn /= np.linalg.norm(nn, axis=-1)[..., np.newaxis]

azi = np.arccos(np.sum(nn * n0, -1))
if len(np.shape(azi)) > 0:
Expand Down

0 comments on commit fffb864

Please sign in to comment.