Re: [Numpy-discussion] Want to eliminate direct for-loop

2012-02-11 Thread Dinesh B Vadhia
of r, s and c are very large with the for-loop calculation repeated continuously (with different r, s and c). From: eat Sent: Saturday, February 11, 2012 3:12 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Want to eliminate direct for-loop Hi, On Sat, Feb 11, 2012

Re: [Numpy-discussion] Want to eliminate direct for-loop

2012-02-11 Thread eat
Hi, On Sat, Feb 11, 2012 at 10:56 PM, Dinesh B Vadhia wrote: > ** > Could the following be written without the direct for-loop? > > import numpy > # numpy vector r of any data type and length, eg. > r = numpy.ones(25, dtype='int') > # s is a list of values (of any data type), eg. > s = [47, 27,

[Numpy-discussion] Want to eliminate direct for-loop

2012-02-11 Thread Dinesh B Vadhia
Could the following be written without the direct for-loop? import numpy # numpy vector r of any data type and length, eg. r = numpy.ones(25, dtype='int') # s is a list of values (of any data type), eg. s = [47, 27, 67] # c is a list of (variable length) lists where the sub-list elements are inde