[Numpy-discussion] Array accumulation in numpy

Tony Ladd tladd@che.ufl....
Tue Feb 19 09:22:56 CST 2013


Alan

Thanks - I felt sure there had to be an easy idea.

Best

Tony

On 02/19/2013 10:17 AM, Alan G Isaac wrote:
> x=[1,2,3,4,5,6]
> ind=[1,3,9,3,4,1]
> f=np.zeros(10)
> np.bincount(ind,x)
>
> hth,
> Alan Isaac
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

-- 
Tony Ladd

Chemical Engineering Department
University of Florida
Gainesville, Florida 32611-6005
USA

Email: tladd-"(AT)"-che.ufl.edu
Web    http://ladd.che.ufl.edu

Tel:   (352)-392-6509
FAX:   (352)-392-9514





More information about the NumPy-Discussion mailing list