added NumpyRngSeed type to rotation rng_seed objects

This commit is contained in:
Daniel Otto de Mentock 2022-02-03 12:04:31 +01:00
parent df54bf724c
commit f80de7d0b3
1 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ from . import util
from . import grid_filters from . import grid_filters
from typing import Union, Sequence, Tuple, Literal, List, TypeVar from typing import Union, Sequence, Tuple, Literal, List, TypeVar
from ._typehints import FloatSequence, IntSequence from ._typehints import FloatSequence, IntSequence, NumpyRngSeed
_P = -1 _P = -1
@ -963,7 +963,7 @@ class Rotation:
@staticmethod @staticmethod
def from_random(shape: Tuple[int, ...] = None, def from_random(shape: Tuple[int, ...] = None,
rng_seed: Union[int, IntSequence] = None) -> 'Rotation': rng_seed: NumpyRngSeed = None) -> 'Rotation':
""" """
Initialize with random rotation. Initialize with random rotation.
@ -997,7 +997,7 @@ class Rotation:
N: int = 500, N: int = 500,
degrees: bool = True, degrees: bool = True,
fractions: bool = True, fractions: bool = True,
rng_seed: Union[int, IntSequence] = None) -> 'Rotation': rng_seed: NumpyRngSeed = None) -> 'Rotation':
""" """
Sample discrete values from a binned orientation distribution function (ODF). Sample discrete values from a binned orientation distribution function (ODF).
@ -1054,7 +1054,7 @@ class Rotation:
sigma: float, sigma: float,
N: int = 500, N: int = 500,
degrees: bool = True, degrees: bool = True,
rng_seed: Union[int, IntSequence] = None) -> 'Rotation': rng_seed: NumpyRngSeed = None) -> 'Rotation':
""" """
Calculate set of rotations with Gaussian distribution around center. Calculate set of rotations with Gaussian distribution around center.
@ -1090,7 +1090,7 @@ class Rotation:
sigma: float = 0.0, sigma: float = 0.0,
N: int = 500, N: int = 500,
degrees: bool = True, degrees: bool = True,
rng_seed: Union[int, IntSequence] = None): rng_seed: NumpyRngSeed = None):
""" """
Calculate set of rotations with Gaussian distribution around direction. Calculate set of rotations with Gaussian distribution around direction.