8000 numpy.random.RandomState() fails silently if /dev/urandom returns nothing · Issue #14844 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
numpy.random.RandomState() fails silently if /dev/urandom returns nothing #14844
Closed
@kskyten

Description

@kskyten

For some reason, I get nothing back when I run cat /dev/urandom | base64 | head -c 5 on my system. This turns numpy deterministic silently.

Reproducing code example:

Running

import numpy as np
print(np.random.RandomState().get_state()[1][0])
print(np.random.RandomState().get_state()[1][0])

should print two different numbers. I get the same number twice.

Numpy/Python version information:

1.17.3 3.7.5 (default, Oct 17 2019, 12:09:47)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0