Try this: after applying the .as_matrix on your series object
Y.reshape((2,1))
Since .as_matrix() only returns a numpy-array NOT a numpy-matrix. Link here
1.4m articles
1.4m replys
5 comments
57.0k users