Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/ess/beer/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
def _rotation_from_y_rotation_matrix(rot):
'''Assuming the rotation is around the y-axis
this function creates a rotation operator from the rotation matrix.'''
angle = np.atan2(rot[2, 0], rot[0, 0])
# Numpy backwards compatibility.
atan2 = np.atan2 if hasattr(np, 'atan2') else np.arctan2
angle = atan2(rot[2, 0], rot[0, 0])
return sc.spatial.rotation(
value=[
0.0,
Expand Down
Loading