expanded rng_seed typehint to array_like type

adjusted alpha and beta types for from_fiber_component to also accept 
lists
removed superfluous kwargs argument in from_ODF and from_parallel 
functions
This commit is contained in:
Daniel Otto de Mentock 2022-01-03 15:35:28 +01:00
parent 65633ee6b1
commit 5702614c4f
1 changed files with 6 additions and 8 deletions

View File

@ -820,8 +820,7 @@ class Rotation:
@staticmethod
def from_parallel(a: np.ndarray,
b: np.ndarray,
**kwargs) -> "Rotation":
b: np.ndarray ) -> "Rotation":
"""
Initialize from pairs of two orthogonal lattice basis vectors.
@ -971,8 +970,7 @@ class Rotation:
N: int = 500,
degrees: bool = True,
fractions: bool = True,
rng_seed: Union[None, int, Sequence[int], np.ndarray] = None,
**kwargs) -> "Rotation":
rng_seed: Union[None, int, Sequence[int], np.ndarray] = None) -> "Rotation":
"""
Sample discrete values from a binned orientation distribution function (ODF).
@ -1029,7 +1027,7 @@ class Rotation:
sigma: float,
N: int = 500,
degrees: bool = True,
rng_seed: Union[None, int, Sequence[float], np.ndarray] = None) -> "Rotation":
rng_seed: Union[None, int, Sequence[int], np.ndarray] = None) -> "Rotation":
"""
Calculate set of rotations with Gaussian distribution around center.
@ -1060,12 +1058,12 @@ class Rotation:
@staticmethod
def from_fiber_component(alpha: np.ndarray,
beta: np.ndarray,
def from_fiber_component(alpha: Union[Sequence[int], np.ndarray],
beta: Union[Sequence[int], np.ndarray],
sigma: float = 0.0,
N: int = 500,
degrees: bool = True,
rng_seed: bool = None):
rng_seed: Union[None, int, Sequence[int], np.ndarray] = None):
"""
Calculate set of rotations with Gaussian distribution around direction.