[PYTHON MATRIX-SIG] Slice notation and function ranks
James Hugunin
jjh@Goldilocks.LCS.MIT.EDU
Mon, 29 Jan 96 12:34:47 EST
From: Chris Chase S1A <chris.chase@jhuapl.edu>
JH> Things I plan to fix ASAP
JH> 1) Integrate Chris Chase's grammar patches to replace
JH> Slice(None,None,2) with ::2.
JH> 2) Make matrixMultiply work on matrices larger than 2d (this
JH> requires a notion of rank).
The ":" patch is missing.
I haven't checked yet for extension of matrix multiplication to larger
dimensional arrays.
Are these to be added?
I'd still like to do these ASAP, but that "as possible" part is really
getting in my way.
I'm eager to produce a stable, robust, useful version of the array
object that Guido will be happy to include as part of the standard
distribution as quickly as possible. I think that it would be a very
GOOD THING to have these array objects as a standard module in
Python-1.4. In the interests of moving this along, I'm unfortunately
neglecting two things that I'd also really like to see done.
1) Better multidimensional indexing (a[:-1, ::2] as well as a[1, .., 2])
Why not? I don't feel like I have the energy to do the necessary
lobbying to convince the python community/Guido that these changes to
the python core are needed. I'm using Konrad's patches because he
packaged them up nicely and negociated with Guido for their inclusion
in the next release of the language core. If somebody (Chris?) can
produce a similar set of patches for slices (okay you've done this
part) AND get Guido to agree to add them to the python core, then I'd
love to incorporate them with the NumericPython package.
2) A solid notion of rank for both bounded and unbounded rank
functions
Why not? Personally I have no pressing need for this capability (my
own needs for ranks are satisfied by pseudo-indices), and I figure it
would probably take me two-weeks of serious work to do this right and
make sure it's bug free.
Also, this particular feature is an extension to the basic array
system, so it can always be added later without causing any
incompatible changes (I took reasonable care designing the ofuncobject
with such an extension in mind). This makes me feel more comfortable with
waiting on it until after a solid release 1.0 is out.
-Jim
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================