- changed status to resolved
seeding RandomState with long fails
Issue #23
resolved
The code
import numpy as np
np.random.RandomState(1l)
fails with the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/pypy/site-packages/numpy/random/mtrand.py", line 451, in __init__
self.seed(seed)
File "/opt/pypy/site-packages/numpy/random/mtrand.py", line 485, in seed
init_by_array(self.internal_state, obj, obj.shape[0])
NameError: global name 'init_by_array' is not defined
It would be nice if I could seed the random generator with longs or alternatively if the error message could be a bit clearer.
Comments (1)
-
- Log in to comment
fixed in changeset f58d51c, both init_by_array() and long seeds should now work