I realize this should be really easy, but I have a large dataset (14k points) and I was having memory issues with my dumb new to coding way of doing this.
So. I have three ordered lists, xnew is x coordinates, ynew is y coordinates, and znew is z coordinates. I want an array where each row is one point, with three columns, x, y and z respectively. First I tried this:
points = []
for point_number in range(len(xnew)):
points.append((xnew[point_number], ynew[point_number],
znew[point_number]))
xyz_out = np.array(points)
which worked for small sections of my data, but not for the whole thing.
Right now, I have this:
xyz_out = np.array([xnew, ynew, znew])
xyz_out.transpose((1, 0))
return xyz_out
which, for some reason doesn't transpose my data even though it seems like it should from the transpose documentation. Any suggestions?