Skip to content

Commit

Permalink
BLD: fix cython error on master-branch cython
Browse files Browse the repository at this point in the history
Cython now complains if the types of the two branches in the ternary
statement do not match (here 1D vs 2D).
  • Loading branch information
tacaswell authored and tylerjereddy committed Jul 22, 2020
1 parent de60e9a commit d5aaa07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scipy/spatial/transform/rotation.py
Expand Up @@ -861,7 +861,11 @@ def from_euler(cls, seq, angles, degrees=False):
"num_axes), got {}.".format(angles.shape))

quat = _elementary_quat_compose(seq, angles, intrinsic)
return cls(quat[0] if is_single else quat, normalize=False, copy=False)

if is_single:
return cls(quat[0], normalize=False, copy=False)
else:
return cls(quat, normalize=False, copy=False)

def as_quat(self):
"""Represent as quaternions.
Expand Down

0 comments on commit d5aaa07

Please sign in to comment.