Here I have this where import data as arrays then, operates on those arrays with a function
import numpy as np
n1 = an array of 999 numbers
mass1= an array of 999 numbers
x1= an array of 999 numbers
y1=an array of 999 numbers
z1=an array of 999 numbers
dt=.0001
npoints=len(n1)
xn=0
step=1
for timedt in xrange(0,npoints-1):
step=step
for l in xrange(0,npoints-1):
xn=xn
f=x1,y1,z1[xn]+x1,y1,z1[step]
xn=xn+1
step=step+1
print f
However, when I print out f, I just get a huge list set of numbers in the format
.....
-9.622302989262075e-07
0.00016890654402323984
2.261014843829707e-05
-0.00011706036947314393
-7.791712660429376e-05
1.0156155973842854e-05
0.00019244252361596046
-0.00019202953520118445
0.04082168851673397
-0.001675463103312094
-1.4584179607758451e-05
3.788355464183264
3.99516377369456e-05
But I want to make these numbers be one array. In additon if I print f outside of that loop, I only get the last number. 3.99516377369456e-05
But I want to be able to print all of them outside of the loop as an array.
np.asarray
doesn't work.
n1really an 'array' (as innumpy.ndarray), or just a sloppy way of sayinglist?