I’m trying to use numpy.take() to get, like the documentation says, elements from an array along an axis.
My code:
print np.take(testArray,axis=1)
Gives the following counter-intuitive error:
TypeError: take() takes at least 2 arguments (2 given)
Well, if two are given, what is wrong then?
In order to debug, I printed the shapes:
print testArray[:, 1].shape
print testArray[:, 1]
(1L, 4L)
[[ 251 100 4 886271884]]