SyntaxFix
Write A Post
Hire A Developer
Questions
>>> test array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]) >>> ncol = test.shape[1] >>> ncol 5L
Then you can select the 2nd - 4th column this way:
>>> test[0:, 1:(ncol - 1)] array([[1, 2, 3], [6, 7, 8]])