TypeError: only length-1 arrays can be converted to Python scalars.

2008-02-28 Thread nure123
Hi All, Could anybody tell me what is the problem with the following sequence with which I always get the above error message. I use Numeric and Python 2.4 x=array([1,2,3,4]) y=exp(x) Nure -- http://mail.python.org/mailman/listinfo/python-list

Re: What is wrong with this

2008-02-09 Thread nure123
On Feb 9, 8:56 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 09 Feb 2008 16:44:52 -0800, nure123 wrote: > > Hi, > > > I am new to Python and would be grateful if anyone could tell me what is > > wrong with the following s

What is wrong with this

2008-02-09 Thread nure123
Hi, I am new to Python and would be grateful if anyone could tell me what is wrong with the following statement. Y=array([1/S, 0*lam]) where S=[1, 2, 3, 4] lam=[5, 6, 7, 8] I am using Numeric not the NumPy and the original module in which this statement appears is supposed to be working perfect