added generator typehint to from_random function

This commit is contained in:
Daniel Otto de Mentock 2022-01-03 16:44:27 +01:00
parent 5702614c4f
commit 9a9ec11c29
1 changed files with 1 additions and 1 deletions

View File

@ -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])