[PYTHON MATRIX-SIG] Final conventions for alpha2

Jim Hugunin hugunin@mit.edu
Mon, 19 Aug 1996 13:22:09 -0400


Konrad HINSEN wrote:
> 
> > Concatenation is reasonably efficient.  It could be better, but I'm
> > holding off on any non-trivial efficiency improvements until after
> > release 1.0.  Right now I think a solid, stable and reasonably complete
> > implementation is much more important.
> >
> > I don't see any good way to solve Carlos's problem using concatenation
> > (without including arbitrary comparision functions for sort which I
> > don't want to do).  How would you reccommend he gets the equivalent of:
> >
> > ix=argsort(a)
> > A=take(a,ix)
> > B=take(b,ix)
> >
> > for > 1d arrays without some take-like function?
> 
> Concatenation is indeed not what is needed, it is what APL
> calls lamination (but it is implemented as a special case
> of concatenation): the creation of a new axis along which
> the index 0 refers to a and the index 1 to b. Sort() then
> reshuffles all elements automatically, and a simple indexing
> recovers the sorted a and b.

by lamination you mean array([a,b])?  This still doesn't solve the
problem.  in this case and an b will each be sorted according to their
own values.  

-Jim

=================
MATRIX-SIG  - SIG on Matrix Math for Python

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