Re: [Tutor] numarray issues

2008-12-15 Thread bob gailer
11:19 am Subject: Re: [Tutor] numarray issues Mr Gerard Kelly wrote: Hello, I am a python beginner, and I have a question about scalars vs arrays. I am making a (very simple) code, and part of it is: from numarray import * from math import

Re: [Tutor] numarray issues

2008-12-15 Thread bob gailer
Mr Gerard Kelly wrote: Hello, I am a python beginner, and I have a question about scalars vs arrays. I am making a (very simple) code, and part of it is: from numarray import * from math import * def source(x,y): f=sin(x) return f a=4. m=10 dx=a/(m+1.) x=zeros([m,1], Float) print x[0]

[Tutor] numarray issues

2008-12-15 Thread Mr Gerard Kelly
Hello, I am a python beginner, and I have a question about scalars vs arrays. I am making a (very simple) code, and part of it is: from numarray import * from math import * def source(x,y): f=sin(x) return f a=4. m=10 dx=a/(m+1.) x=zeros([m,1], Float) print x[0] print func(x[0]) When