Does anybody know how to extract a column from a multi-dimensional array in Python?
One more way using matrices
>>> from numpy import matrix >>> a = [ [1,2,3],[4,5,6],[7,8,9] ] >>> matrix(a).transpose()[1].getA()[0] array([2, 5, 8]) >>> matrix(a).transpose()[0].getA()[0] array([1, 4, 7])