[PYTHON MATRIX-SIG] RubberIndex

David Ascher da@maigret.cog.brown.edu
Mon, 12 Feb 1996 22:39:01 -0500 (EST)


I'm still trying to figure out the ... index.  If I understand
correctly, it stands for "however many ':' I need depending on the rank
of the object I'm indexing, so that the indices I *do* specify are at the
end of the index list as opposed to the usual beginning.

So, if I have a rank-3 array A, then

	A[...,0] 

is the same thing as

	A[:,:,0]

but if B is rank-4, then

	B[...,0]

is the same thing as:

	B[:,:,:,0]

This "stretching" only works from the left: In other words, if '...' is
used *after* a non-pseudo index, then it is equivalent to ':', and does
not stretch.  [should ... be allowed after a non-pseudo index?]

If C is a rank-5 array, then

	C[...,0,...]

is the same thing as

	C[...,0,:]
and
	C[:,:,:,0,:]

but NOT:

	C[:,:,0,:,:]

This seems to work with my test cases.  Am I missing some key
functionality?
 
--david

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================