Mandus wrote:
> Tue, 20 Dec 2005 19:32:13 +0530 skrev Suresh Jeevanandam:
>
>>Hi all,
>> Lets say I have an array:
>> from numarray import *
>> a = array([ 6, 7, 8, 9, 10, 11, 12])
>>
>> I want to multiply out all the elements and get the result.
>>
>> r = 1.0
>>
Suresh Jeevanandam wrote:
> Hi all,
> Lets say I have an array:
> from numarray import *
> a = array([ 6, 7, 8, 9, 10, 11, 12])
>
> I want to multiply out all the elements and get the result.
>
> r = 1.0
> for i in a:
> r = r*i
>
>
Tue, 20 Dec 2005 19:32:13 +0530 skrev Suresh Jeevanandam:
> Hi all,
> Lets say I have an array:
> from numarray import *
> a = array([ 6, 7, 8, 9, 10, 11, 12])
>
> I want to multiply out all the elements and get the result.
>
> r = 1.0
> for i in a:
>
Hi all,
Lets say I have an array:
from numarray import *
a = array([ 6, 7, 8, 9, 10, 11, 12])
I want to multiply out all the elements and get the result.
r = 1.0
for i in a:
r = r*i
Is there any faster, efficient