small flaws detected by pylint

This commit is contained in:
Martin Diehl 2020-03-22 16:31:14 +01:00
parent b6d50db177
commit 1dfdd264b7
1 changed files with 5 additions and 5 deletions

View File

@ -292,7 +292,7 @@ class Rotation:
if degrees: ax[ 3] = np.radians(ax[3])
if normalise: ax[0:3] /= np.linalg.norm(ax[0:3])
if ax[3] < 0.0 or ax[3] > np.pi:
raise ValueError('Axis angle rotation angle outside of [0..π].\n'.format(ax[3]))
raise ValueError('Axis angle rotation angle outside of [0..π].\n{}'.format(ax[3]))
if not np.isclose(np.linalg.norm(ax[0:3]), 1.0):
raise ValueError('Axis angle rotation axis is not of unit length.\n{} {} {}'.format(*ax[0:3]))
@ -338,7 +338,7 @@ class Rotation:
if not np.isclose(np.linalg.norm(ro[0:3]), 1.0):
raise ValueError('Rodrigues rotation axis is not of unit length.\n{} {} {}'.format(*ro[0:3]))
if ro[3] < 0.0:
raise ValueError('Rodrigues rotation angle not positive.\n'.format(ro[3]))
raise ValueError('Rodrigues rotation angle not positive.\n{}'.format(ro[3]))
return Rotation(Rotation.ro2qu(ro))
@ -384,7 +384,7 @@ class Rotation:
"""
if not all(isinstance(item, Rotation) for item in rotations):
raise TypeError("Only instances of Rotation can be averaged.")
raise TypeError("Only instances of Rotation can be averaged.")
N = len(rotations)
if weights == [] or not weights:
@ -713,8 +713,8 @@ class Rotation:
@staticmethod
def ro2om(ro):
"""Rodgrigues-Frank vector to rotation matrix."""
return Rotation.ax2om(Rotation.ro2ax(ro))
"""Rodgrigues-Frank vector to rotation matrix."""
return Rotation.ax2om(Rotation.ro2ax(ro))
@staticmethod
def ro2eu(ro):