[Numpy-discussion] efficient 3d histogram creation

Stéfan van der Walt stefan@sun.ac...
Sun May 3 19:57:23 CDT 2009


Hi Chris

2009/5/4 Chris Colbert <sccolbert@gmail.com>:
> I'm not sure:
>
> the docs say the input has to be:
> sample : array_like
>     Data to histogram passed as a sequence of D arrays of length N, or
>     as an (N,D) array
>
> i have an (N,M,D) array and not sure how to get it to conform to input
> required, mainly because I don't understand what it's asking.

Try

count, bins = np.histogramdd(x.reshape((-1,3)), bins=16)

Regards
Stéfan


More information about the Numpy-discussion mailing list