Trouble with reading 2d array

What does “print O3.shape” return?

Ben Root


On Wed, Aug 31, 2011 at 3:45 PM, Alexa Villaume <alexa7890@…287…> wrote:

#Load data in

O3 = loadtxt(‘O3arr.txt’)

#Specify coordinates of the surface

y=np.arange(-0.25, 6.0, 0.25) #The range of the ionization parameter

x=np.arange(-1.0, 3.1, 0.1) #The range of the metallcity values

#Define levels. Observed column density ± 3 sigma

O3Level = [13.936, 14.047, 14.158]

#Contour the arrays.

plt.contour(x, y, O3, O3Level)

With x and y defined as they are I get a type error that says x and y should be the same length as the columns and rows of z, which they are. So I’m not sure why I get that error.