Skip to content

Commit

Permalink
Correct some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Jul 17, 2024
1 parent cfbec41 commit 0cd6283
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion quaternionic/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import numpy as np
from scipy.linalg import eigh

from . import jit, array, unflip_rotors
from . import jit, array
from .interpolation import unflip_rotors

def align(a, b, w=None):
"""Find the rotation aligning vectors `a` to `b`
Expand Down
7 changes: 6 additions & 1 deletion quaternionic/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
from .properties import QuaternionPropertiesMixin
from .converters import QuaternionConvertersMixin

try:
_ones_like = np._core.umath._ones_like
except AttributeError:
_ones_like = np.core.umath._ones_like


def QuaternionicArray(jit=jit, dtype=float):
"""Construct a quaternionic array type.
Expand Down Expand Up @@ -184,7 +189,7 @@ def __array_ufunc__(self, ufunc, method, *args, **kwargs):
elif ufunc in [
np.negative, np.positive, np.conj, np.conjugate, np.invert,
np.exp, np.log, np.sqrt, np.square, np.reciprocal,
np.core.umath._ones_like,
_ones_like,
]:
if this_type(args[0]):
a1 = args[0]
Expand Down

0 comments on commit 0cd6283

Please sign in to comment.