[Numpy-tickets] [NumPy] #928: histogramdd() overflow error on high-dimension arrays
NumPy
numpy-tickets@scipy....
Mon Oct 13 11:47:40 CDT 2008
#928: histogramdd() overflow error on high-dimension arrays
------------------------+---------------------------------------------------
Reporter: jvansanten | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.lib | Version: none
Severity: normal | Keywords:
------------------------+---------------------------------------------------
When histogramdd() is called on a large array (say, 5 dimensions with 100
bins each), it tries to create a flat array of the bins. The size of the
flat array is given by nbin.prod(). prod() uses the dtype of nbin by
default (int32), which on arrays like the example above overflows into a
negative integer, throwing an error.
This is of course not a problem until one starts working with gigantic
histograms, but it can be tricky nonetheless. Forcing nbin.prod() to use a
long would clean this up nicely (I think).
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/928>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list