[Numpy-discussion] efficient 3d histogram creation
Stéfan van der Walt
stefan at sun.ac.za
Sun May 3 20:57:23 EDT 2009
Hi Chris
2009/5/4 Chris Colbert <sccolbert at 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