Re: [Tutor] TypeError: only length-1 arrays can be converted to Python scalars

2012-01-26 Thread Peter Otten
stm atoc wrote: > Hi, > > I have a question regarding the TypeError. > > I have this script as follows in Python. I have run a program in Fortran: > > # coding: utf-8 > from pylab import * > import numpy > import matplotlib.pyplot as pyplot > import matplotlib.mlab as mlab > > t=3600 > N = 100

[Tutor] TypeError: only length-1 arrays can be converted to Python scalars

2012-01-26 Thread stm atoc
Hi, I have a question regarding the TypeError. I have this script as follows in Python. I have run a program in Fortran: # coding: utf-8 from pylab import * import numpy import matplotlib.pyplot as pyplot import matplotlib.mlab as mlab t=3600 N = 100 dz = 1.0 with open("act_out.list", "r") as