[Matrix-SIG] [PSA MEMBERS] Numeric Python Set function
Paul F. Dubois
Paul F. Dubois" <email@example.com
Fri, 5 Jun 1998 08:51:05 -0700
Since it is nice to have a positive answer to a question, I want to make
sure Zane's answer reaches the matrix-sig. Please excuse if you already saw
Is this function, or others in arrayfns, something we should move into NumPy
proper? I think array_set does sound like an important function.
From: Zane Motteler <firstname.lastname@example.org>
To: Michel Sanner <email@example.com>
Cc: firstname.lastname@example.org <email@example.com>
Date: Friday, June 05, 1998 7:23 AM
Subject: Re: [PSA MEMBERS] Numeric Python Set function
>>I was wondering if there is something like a "set" function in
>>Numeric Python that would allow to set values in an array given
>>an array of indices and an array of values. (somehow the same
>>operation as take() but to set values).
>Not in numeric python. However, when I was writing the PyGist
>graphics interface, I found the need for such a function.
>I wrote a module called 'arrayfnsmodule' which contains a
>function array_set which takes three arguments: the first
>is a one-dimensional array, the second is a one-dimensional
>array of valid subscripts into the first, and the third
>is either a scalar or an array of the same length as the
>second argument, to be assigned to the specified places in
>the first array.
>This module and all others for which we are responsible at LLNL
>can be found at our anonymous ftp site, ftp-icf.llnl.gov,
>at /ftp/pub/python/LLNLPython1.tgz. If you gunzip and untar
>this file, the source is found in
>You can build a shared object for this module (and others in
>the Graphics subdirectory) by moving Makefile.pre.in from
>Python-1.5.1/Misc to Graphics, and then typing 'python makethis.py'.
>Hope this helps.
> Zane C. Motteler, Ph. D.
>Computer Scientist | Professor Emeritus of
>Lawrence Livermore National | Computer Science and Engineering
> Laboratory | California Polytechnic
>P. O. Box 808, L-038 | State University
>Livermore, CA 94551-9900 | San Luis Obispo, CA 93407
>925/423-2143, FAX 925/423-9208 | firstname.lastname@example.org
>(For FedEx, UPS, etc. use street address 7000 East Avenue, zip 94550)
>PSA-MEMBERS -- Python Software Activity Members
>send messages to: email@example.com
>administrivia to: firstname.lastname@example.org