[Numpy-discussion] Naming a slice index?

Eagle Jones eagle@newdream....
Mon Oct 1 11:32:33 CDT 2007

New to python and numpy; hopefully I'm missing something obvious. I'd
like to be able to slice an array with a name. For example:

_T = 6:10
_R = 10:15
A = identity(20)
foo = A[_T, _R]

This doesn't work. Nor does _T=range(6:10); _R = range(10:15). Any ideas?


More information about the Numpy-discussion mailing list