[PYTHON MATRIX-SIG] Final conventions for alpha2
Mon, 19 Aug 1996 12:46:30 -0400
Konrad HINSEN wrote:
> > On Sun, 18 Aug 1996, Jim Hugunin wrote:
> > > Carlos Fonseca wrote:
> > >
> > > > ix=argsort(a)
> > > > A=take(a,ix)
> > > > B=take(b,ix)
> > > >
> > > > This should be enough.
> > >
> > > You have a good point here, but I think that the issue is you want a
> > > different function from Konrad. Alright, writing functions is something
> > > I can do. What would you like it to be called?
> > How do you feel about index(a,indices,axis). Alternatively, select(...)
> > would also make sense, I think. Thanks for looking into this.
> Before we add functions that differ only in details, let's consider
> the APL approach to this kind of problem: concatenate the two arrays,
> sort the result, and split them again. How efficient would that
> be in Python? It mostly depends on the concatenation (which APL
> implementations treat with special care because it is extremely
> frequently used).
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:
for > 1d arrays without some take-like function?
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com