From f80de7d0b36b8dcd63e876a43763e4a897fdd01e Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Thu, 3 Feb 2022 12:04:31 +0100 Subject: [PATCH] added NumpyRngSeed type to rotation rng_seed objects --- python/damask/_rotation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index 361dba7c1..d919c9029 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -7,7 +7,7 @@ from . import util from . import grid_filters from typing import Union, Sequence, Tuple, Literal, List, TypeVar -from ._typehints import FloatSequence, IntSequence +from ._typehints import FloatSequence, IntSequence, NumpyRngSeed _P = -1 @@ -963,7 +963,7 @@ class Rotation: @staticmethod def from_random(shape: Tuple[int, ...] = None, - rng_seed: Union[int, IntSequence] = None) -> 'Rotation': + rng_seed: NumpyRngSeed = None) -> 'Rotation': """ Initialize with random rotation. @@ -997,7 +997,7 @@ class Rotation: N: int = 500, degrees: 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). @@ -1054,7 +1054,7 @@ class Rotation: sigma: float, N: int = 500, degrees: bool = True, - rng_seed: Union[int, IntSequence] = None) -> 'Rotation': + rng_seed: NumpyRngSeed = None) -> 'Rotation': """ Calculate set of rotations with Gaussian distribution around center. @@ -1090,7 +1090,7 @@ class Rotation: sigma: float = 0.0, N: int = 500, degrees: bool = True, - rng_seed: Union[int, IntSequence] = None): + rng_seed: NumpyRngSeed = None): """ Calculate set of rotations with Gaussian distribution around direction.