I have three lists that I want to convert into one list. When I try the following a get this error
A = numpy.array(X,Y,Z,dtype=float)
ValueError: only 2 non-keyword arguments accepted
I did not see anything here that says you can only give it two arguments
http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html
Here is the code
import numpy
from numpy import *
X = []
Y = []
Z = []
f = open(r'C:\My.txt')
f.readline()
for line in f:
if line != '':
line = line.strip()
columns = line.split()
x = columns[2]
y = columns[3]
z = columns[4]
X.append(x)
Y.append(y) #appends data in list
Z.append(z)
A = numpy.array(X,Y,Z,dtype=float)
A.shape(3,3)
print(A)
Thanks in advanceh
[0,0,0,0], [3,4,4,3], [3,4,3,4]what I would like is list one the first column list two the second list three the third. This will eventually involve three very large lists that need to be converted into one array for analysis. Thank you