[NumPy-Tickets] [NumPy] #1541: random.uniform gives inf when using finfo('float').min, finfo('float').max as intervall

NumPy Trac numpy-tickets@scipy....
Sat Jul 10 03:14:54 CDT 2010

```#1541: random.uniform gives inf when using finfo('float').min, finfo('float').max
as intervall
------------------------------------------------+---------------------------
Reporter:  bowie_22                            |       Owner:  somebody
Type:  defect                              |      Status:  new
Priority:  normal                              |   Milestone:  1.5.0
Component:  numpy.random                        |     Version:  1.4.0
Keywords:  Random.uniform  inf finfo('float')  |
------------------------------------------------+---------------------------
Using the following statement gives also inf as output.

{{{
print(np.random.uniform(np.finfo('float').min, np.finfo('float').max,
size=(2,2)))
[[ Inf  Inf]
[ Inf  Inf]]
}}}

some "experiments" have shown the follwing behavior:

{{{
print(np.random.uniform(-1.7976931348623157e+292, np.finfo('float').max,
size=(2,2)))
[[ Inf  Inf]
[ Inf  Inf]]

}}}

{{{
print(np.random.uniform(-1.7976931348623157e+291, np.finfo('float').max,
size=(2,2)))
[[  3.02733730e+307   5.55521694e+307]
[  1.64373640e+308   1.54380200e+308]]

}}}

Where

{{{
print(np.finfo('float').max)
1.79769313486e+308
}}}

and

{{{
print(np.finfo('float').min)
-1.79769313486e+308
}}}

--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1541>
NumPy <http://projects.scipy.org/numpy>
My example project
```