[NumPy-Tickets] [NumPy] #1678: problem in the poisson distribution
NumPy Trac
numpy-tickets@scipy....
Thu Nov 18 13:56:36 CST 2010
#1678: problem in the poisson distribution
---------------------------+------------------------------------------------
Reporter: gruel | Owner: somebody
Type: defect | Status: closed
Priority: normal | Milestone: 2.0.0
Component: numpy.random | Version: 1.5.0
Resolution: invalid | Keywords:
---------------------------+------------------------------------------------
Changes (by pv):
* status: new => closed
* resolution: => invalid
Comment:
{{{
>>> import numpy
>>> x=numpy.random.poisson(100, 10000)
>>> numpy.unique(x)
array([ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 138, 139, 143])
}}}
The regular empty spaces in the histogram plot are probably because all of
the random numbers are integers, and some of the 100 bins in [67,143] have
no integer values inside them. As 143-67=83 < 100, you should get ~ 20
empty bins, which matches what is in the plot.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1678#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list