[PYTHON MATRIX-SIG] slicing rank-1 arrays

David Ascher da@maigret.cog.brown.edu
Sun, 4 Feb 1996 17:54:46 -0500 (EST)


Given the following, which seems fine:

	>>> a
	0 1 2 3 4
	0 1 2 3 4
	0 1 2 3 4
	0 1 2 3 4
	>>> a[All,All]
	0 1 2 3 4
	0 1 2 3 4
	0 1 2 3 4
	0 1 2 3 4

why doesn't the following work?

	>>> b
	0 1 2 3 4
	>>> b[All]
	Traceback (innermost last):
	  File "<stdin>", line 1, in ?
	AttributeError: __len__
	>>> b[Reverse]
	Traceback (innermost last):
	  File "<stdin>", line 1, in ?
	AttributeError: __len__

[Using 0.33 on an SGI]

--david


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

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