Hi all,

Could anybody tell me what is wrong with the following sequence of statements with which I always get the error message: TypeError: only length-1 arrays can be converted to Python scalars. I have the Numeric imported and am using Python 2.4.

x=array([1,2,3,4])
y=exp(x)

Nure

Obviously exp() can't use an array as input. This makes sense. I suggest you ask this question on the Numpy board. People there will have more info on how/if you can use an array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.