avoid name clash: as_Rodrigues_vector(vector = ...)
This commit is contained in:
parent
1c07152b96
commit
894a8de9f9
|
@ -469,7 +469,7 @@ class Orientation(Rotation):
|
|||
if self.family is None:
|
||||
raise ValueError('Missing crystal symmetry')
|
||||
|
||||
rho_abs = np.abs(self.as_Rodrigues_vector(vector=True))
|
||||
rho_abs = np.abs(self.as_Rodrigues_vector(compact=True))
|
||||
|
||||
with np.errstate(invalid='ignore'):
|
||||
# using '*'/prod for 'and'
|
||||
|
@ -512,7 +512,7 @@ class Orientation(Rotation):
|
|||
if self.family is None:
|
||||
raise ValueError('Missing crystal symmetry')
|
||||
|
||||
rho = self.as_Rodrigues_vector(vector=True)
|
||||
rho = self.as_Rodrigues_vector(compact=True)
|
||||
|
||||
with np.errstate(invalid='ignore'):
|
||||
if self.family == 'cubic':
|
||||
|
|
|
@ -357,7 +357,7 @@ class Rotation:
|
|||
return Rotation._qu2om(self.quaternion)
|
||||
|
||||
def as_Rodrigues_vector(self,
|
||||
vector = False):
|
||||
compact = False):
|
||||
"""
|
||||
Represent as Rodrigues-Frank vector with separated axis and angle argument.
|
||||
|
||||
|
@ -375,7 +375,7 @@ class Rotation:
|
|||
|
||||
"""
|
||||
ro = Rotation._qu2ro(self.quaternion)
|
||||
if vector:
|
||||
if compact:
|
||||
with np.errstate(invalid='ignore'):
|
||||
return ro[...,:3]*ro[...,3:4]
|
||||
else:
|
||||
|
@ -595,13 +595,12 @@ class Rotation:
|
|||
P = -1,
|
||||
**kwargs):
|
||||
"""
|
||||
Initialize from Rodrigues-Frank vector.
|
||||
Initialize from Rodrigues-Frank vector (angle separated from axis).
|
||||
|
||||
Parameters
|
||||
----------
|
||||
rho : numpy.ndarray of shape (...,4)
|
||||
Rodrigues-Frank vector (angle separated from axis).
|
||||
(n_1, n_2, n_3, tan(ω/2)), ǀnǀ = 1 and ω ∈ [0,π].
|
||||
Rodrigues-Frank vector. (n_1, n_2, n_3, tan(ω/2)), ǀnǀ = 1 and ω ∈ [0,π].
|
||||
normalize : boolean, optional
|
||||
Allow ǀnǀ ≠ 1. Defaults to False.
|
||||
P : int ∈ {-1,1}, optional
|
||||
|
|
Loading…
Reference in New Issue