Re: [Numpy-discussion] Array accumulation in numpy

2013-02-19 Thread Tony Ladd
Thanks to all for a very quick response. np.bincount does what I need. Tony On 02/19/2013 10:04 AM, Benjamin Root wrote: > > > On Tue, Feb 19, 2013 at 10:00 AM, Tony Ladd <mailto:tl...@che.ufl.edu>> wrote: > > I want to accumulate elements of a vector (x) to an arr

Re: [Numpy-discussion] Array accumulation in numpy

2013-02-19 Thread Tony Ladd
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 Webhttp://ladd.che.ufl.ed

[Numpy-discussion] Array accumulation in numpy

2013-02-19 Thread Tony Ladd
(e.g. 3 or 1) I realize my code is incorrect, but is there a way to make numpy accumulate without using loops? I would have thought so but I cannot find anything in the documentation. Would much appreciate any help - probably a really simple question. Thanks Tony -- Tony Ladd Chemical