I have 3 lists of coordinates (xs, ys, zs), calling shape(xs) gives (14897L,) however after performing some rotations on the data the shape changes to (14897L, 1L). This breaks some things down the line in my code and I cant work out how to fix it.
The details of what I'm doing might not be important but I've included it just in case
Rot_theta = np.pi
xyz = np.matrix((xs, ys, zs))
Rot_x = np.matrix([[1, 0, 0], [0, np.cos(Rot_theta), -np.sin(Rot_theta)], [0,np.sin(Rot_theta),np.cos(Rot_theta)]])
Rot_y = np.matrix([[np.cos(Rot_theta), 0, np.sin(Rot_theta)], [0, 1, 0], [-np.sin(Rot_theta),0,np.cos(Rot_theta)]])
Rot_z = np.matrix([[np.cos(Rot_theta), -np.sin(Rot_theta), 0], [np.sin(Rot_theta), np.cos(Rot_theta), 0], [0,0,1]])
xyz_Rot =[]
for i in range(n):
xyz_no = Rot_x*xyz[:,i]
xyz_Rot.append((xyz_no))
xyz_Rot = np.array((xyz_Rot))
xs = xyz_Rot[:,0]
ys = xyz_Rot[:,1]
zs = xyz_Rot[:,2]
I dont have a clue why the xs, ys and zs are now in the shape (14897L, 1L). Is there something wrong with how I am applying the rotation matrices? It seems like there should be one or two lines to fix this but I just cant figure it out.