Mathematical Operations on Array
__peter__ at web.de
Fri Apr 1 09:52:55 EDT 2011
Bryan.Fodness at gmail.com wrote:
> I am loading text into an array and would like to convert the values.
> from math import *
> from numpy import *
> from pylab import *
> I am not sure why degrees() works, but acos() does not.
> I receive the following
> Traceback (most recent call last):
> File "C:\ test.py", line 6, in ?
> TypeError: only length-1 arrays can be converted to Python scalars
> Can anyone tell me what I am doing wrong?
Among other things it makes it hard to keep track of where things are coming
>>> from math import *
>>> from numpy import *
<built-in function acos>
More information about the Python-list