So I am trying to upload the file http://www.ice.csic.es/personal/aldos/Solar_Data_files/nudistr_b16_agss09.dat
into my code.
data= np.genfromtxt('nudistr_b16_agss09.csv',delimiter=',',skip_header=21)
t=data[:,1] #temperature (10^6 K)
r=data[:,0] #radius (units of one solar radius)
ne=data[:,2] #Log base 10 of electron density (cm^{-3}/N_A,N_A is Avogadro number)
However I keep getting the error too many indices for array. I do not understand because I have used this format before and have not run into errors such as these before. What can I do to change it?
print(data.shape)on the second line to see if the dimensions ofdatamatch what you are expecting