[Numpy-discussion] np.histogram on arrays.

eat e.antero.tammi at gmail.com
Tue Mar 29 11:16:17 EDT 2011


Hi,

On Tue, Mar 29, 2011 at 5:13 PM, Éric Depagne <eric at depagne.org> wrote:

> > FWIW, have you considered to use
> >
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogramdd.html#
> > numpy.histogramdd
> >
> > Regards,
> > eat
> >
> I tried, but I get a
> /usr/lib/pymodules/python2.6/numpy/lib/function_base.pyc in
> histogramdd(sample, bins, range, normed, weights)
>    370     # Reshape is used so that overlarge arrays
>
>    371     # will raise an error.
>
> --> 372     hist = zeros(nbin, float).reshape(-1)
>    373
>    374     # Compute the sample indices in the flattened histogram matrix.
>
>
> ValueError: sequence too large; must be smaller than 32
>
> so I suspect my array is too big for histogramdd
>
So it seems that you give your array directly to histogramdd (asking a 4000D
histogram!). Surely that's not what you are trying to achieve. Can you
elaborate more on your objectives? Perhaps some code (slow but working) to
demonstrate the point.

Regards,
eat

>
> Éric.
> --
> Un clavier azerty en vaut deux
> ----------------------------------------------------------
> Éric Depagne                            eric at depagne.org
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110329/f87c696a/attachment.html>


More information about the NumPy-Discussion mailing list