Fang Fang wrote: > Thanks for your reply. The simplified code is as follows. It takes 7 > seconds to process 1000 rows, which is tolerable, but I wonder why it > takes so long. Isn't vectorized operation supposed to run very quickly.
One problem is that you are creating a new currSum array for every row. Try using currSum += row -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion