[Matrix-SIG] Re: Numeric plans

Perry Greenfield perry@stsci.edu
Tue, 21 Sep 1999 15:07:31 -0400 (EDT)


We have a few comments on some of the points made in the past week or so
regarding future work on Numeric.

1) "[Numeric] C code is a mess." (David Asher)

Could David, Paul or someone elaborate a bit on what this means?  Is
this meant to say that it is just a mess to modify, or (worse) that it
is unreliable as is?  If the latter, it would seem to argue for a
concerted effort to clean up soon; if the former, it would still argue
for clean up, but perhaps on a more relaxed time scale.  What scale of
effort would be involved?

2) Paul Dubois mentioned the problems he was having settling on a
consensus for how the "inverse of take" (the old scatter/gather issue)
should be implemented when the array being indexed has rank > 1.

> (Periodically the issue is raised of
>
> x[indices] = values
> x[indices] as an r-value
>
> being desireable, as it was recently. As I pointed out before, everyone
> agrees that the above line is desireable, but when x has rank > 1, there
> are strongly differing views of what this ought to mean. Multiple
> intelligent, experienced developers have told me that (a) I am an idiot,
> because (b) there is only one obvious and highly desireable solution,
> namely theirs Unfortunately the latter does not turn out to be the same
> in all cases.
>
> The issue is complicated by the fact that the coding for setindex is
> already totally incomprehensible and so changing it requires a great
> deal of care and testing.
>
> It is time for proposals. Concrete, detailed. Discussion to follow. If
> we can come to a consensus it would be nice.
> Do not forget things like NewAxis, Ellipsis, and the colon. How do these
> things mix and match?

We think (as we've said before) that a less general mechanism would be
better than none if consensus can't be achieved.  In other words, do
what Andrew Mullhaupt suggested and either require x to be rank 1 or
coerce x to rank 1, producing a rank 1 result.  The advantage of the
former is that if we eventually can agree on what should be done with
rank>1, then anything we decide will be backward compatible.  Assuming
that everyone agrees on what this means for a rank-1 array x, that
behavior could be added immediately.

Perhaps Paul (or someone) could summarize the competing views on this
issue to spur some discussion on the more general approach.  There is a
fairly large number of past messages about this spread over years.  A
couple page summary of the competing proposals with the pros and cons
of each (that we are aware of) would help focus the discussion.  Maybe
there will be consensus (or a one that a clear majority favors).  Paul,
is it possible to summarize this?

3) Are there aspects of this work (UserArray, general code clean-ups,
or inverse of take) that others can help contribute to? If not...

4) A means of inheriting Numeric arrays is important to us also and we
are very interested in how that issue is going to be solved. Is there
any way for those of us that are interested to keep abreast of the ongoing
design and implementation discussions? 

Perry Greenfield
Rick White
Paul Barrett