[Numpy-discussion] Re: [Matrix-SIG] An Experiment in code-cleanup.

Konrad Hinsen hinsen at cnrs-orleans.fr
Tue Feb 8 11:12:56 CST 2000


> 3) Facility for memory-mapped dataspace in arrays.

I'd really like to have that...

> 4) Slices become copies with the addition of methods for current strict
> referencing behavior.

This will break a lot of code, and in a way that will be difficult to
debug. In fact, this is the only point you mention which would be
reason enough for me not to use your modified version; going through
all of my code to check what effect this might have sounds like a
nightmare.

I see the point of having a copying version as well, but why not
implement the copying behaviour as methods and leave indexing as it
is?

> 5) Handling of sliceobjects which consist of sequences of indices (so that
> setting and getting elements of arrays using their index is possible). 

Sounds good as well...

> 6) Rank-0 arrays will not be autoconverted to Python scalars, but will
> still behave as Python scalars whenever Python allows general scalar-like
> objects in it's operations.  Methods will allow the
> user-controlled conversion to the Python scalars.  

I suspect that full behaviour-compatibility with scalars is
impossible, but I am willing to be proven wrong. For example, Python
scalars are immutable, arrays aren't. This also means that rank-0
arrays can't be used as keys in dictionaries.

How do you plan to implement mixed arithmetic with scalars? If the
return value is a rank-0 array, then a single library returning
a rank-0 array somewhere could mess up a program well enough that
debugging becomes a nightmare.

> 7) Addition of attributes so that different users can configure aspects of
> the math behavior, to their hearts content.

You mean global attributes? That could be the end of universally
usable library modules, supposing that people actually use them.

> If their is anyone interested in helping in this "unofficial branch
> work" let me know and we'll see about setting up someplace to work.  Be

I don't have much time at the moment, but I could still help out with
testing etc.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------




More information about the Numpy-discussion mailing list