[MATRIX-SIG] A proposal (LONG) - "reverse of take" revisited

Andrew P. Mullhaupt amullhau@ix.netcom.com
Wed, 02 Jul 1997 20:07:41 -0400


At 07:21 AM 7/2/97 -0400, Aaron Watters wrote:

>would work.  Since it does (without copying anything)
>:) a Python implementation of
>"give" or "set" or whatever you want to call it actually might
>be fast enough for practical purposes.  I suppose each
>iteration of the loop would require only one header malloc,
>which might be inexpensive enough, and a C implementation
>might not be too much better. 

In the one dimensional case, I'd expect a factor of 5-10 or so.
In the multidimensional case, you can do some things which will
make this a factor which increases rapidly with the number of
dimensions.

>Where are the details of all the functionality of Numeric
>set out? 

There are some notes from talks by Jim Hugunin on the web.

>note: fancy indexing is fine if you experts think it
>  would be a Good Thing, but remember that Guido
>  does not change the syntax lightly, for good reason.

That's OK. We don't need to change the syntax per se. We
want to change the semantics.

As to how good it is, you can get an indication of how
useful this sort of thing is by the fact that several
interpreters which had strict limits on indexing (APL
at various stages, Matlab until the most recent version,
Speakeasy) were _forced_ by their user communities to
extend the indexing operation over time. Pascal and C,
in every other sense far better languages than Fortran IV,
didn't put a _dent_ in the scientific computing community
for a _very long time_ because they absolutely sucked for
arrays. (C still does).

>  My
>  preference would be to be conservative here until
>  maybe a clear consensus arrives in many months.

It may very well take months to figure out what everyone
wants, but probably not many months.

Later,
Andrew Mullhaupt

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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