From 9a9ec11c29e681cd94f264e7e2a59c73f8bfe5d5 Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Mon, 3 Jan 2022 16:44:27 +0100 Subject: [PATCH] added generator typehint to from_random function --- python/damask/_rotation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index aeac3c3e3..448917488 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -951,7 +951,7 @@ class Rotation: Defaults to None, i.e. unpredictable entropy will be pulled from the OS. """ - rng = np.random.default_rng(rng_seed) + rng: np.random.Generator = np.random.default_rng(rng_seed) r = rng.random(3 if shape is None else tuple(shape)+(3,) if hasattr(shape, '__iter__') else (shape,3)) A = np.sqrt(r[...,2])