Skip to content

np.random.uniform does not raise ValueError when low > high, even though other distribution do (like np.random.randint) #17905

@bvavrik

Description

@bvavrik

print(np.random.randint(2, 1)) raises ValueError, also the documentation of np.random.uniform says those inputs are low and high.

Reproducing code example:

import numpy as np
print(np.random.uniform(2, 1))

NumPy/Python version information:

1.19.2 3.7.7 (default, May 7 2020, 21:25:33)
[GCC 7.3.0]

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