From fc8cd6322c52eebc13c1485aea64e79328e1b8e6 Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Wed, 2 Feb 2022 12:16:57 +0100 Subject: [PATCH] adjusted rng_seed type in rotation adjusted NotImplemented error return in orientation --- python/damask/_orientation.py | 2 +- python/damask/_rotation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/_orientation.py b/python/damask/_orientation.py index 8a560e756..dff380dcf 100644 --- a/python/damask/_orientation.py +++ b/python/damask/_orientation.py @@ -148,7 +148,7 @@ class Orientation(Rotation,Crystal): """ if not isinstance(other, Orientation): - raise NotImplemented + return NotImplemented matching_type = self.family == other.family and \ self.lattice == other.lattice and \ self.parameters == other.parameters diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index a04b20e62..361dba7c1 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -997,7 +997,7 @@ class Rotation: N: int = 500, degrees: bool = True, fractions: bool = True, - rng_seed: Union[None, int, IntSequence] = None) -> 'Rotation': + rng_seed: Union[int, IntSequence] = 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[None, int, IntSequence] = None) -> 'Rotation': + rng_seed: Union[int, IntSequence] = None) -> 'Rotation': """ Calculate set of rotations with Gaussian distribution around center.