[PYTHON MATRIX-SIG] Re: take() again
Konrad Hinsen
hinsen@ibs.ibs.fr
Tue, 20 Aug 1996 19:54:03 +0100
> My proposal is a take(a,indices,axis) where
>
> * the dimensions of indices must be aligned with the *outer* (or leftmost)
> dimensions of a (and not the inner ones, as I proposed before).
>
> * the default axis is the inner axis of _indices_. This is not necessarily
> the inner axis of a, as indices my have lower rank than a. We would still
> say axis=-1, but this would refer to indices, not to a.
You would be welcome in the J development team, because what you have
just described is exactly how J behaves with a modified rank for its
left argument (i.e. the indices). I agree that this is very useful,
but modifying the access to the other argument is also useful.
Obviously the best way out is to have two axis argument, then we
would almost have the full J functionality. But I am not sure whether
that is a realistic proposal.
> If indices is 2d and we want the current behaviour, then take([a],indices)
> will do it. In this way, the rank of the result will only increase if we
> explicitly want it to.
Yes, but what if we want the current behaviour with an arbitrary axis
specification? That would be lost.
Konrad.
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire | Tel.: +33-76.88.99.28
Institut de Biologie Structurale | Fax: +33-76.88.54.94
41, Ave. des Martyrs | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France | Nederlands/Francais
-------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire | Tel.: +33-76.88.99.28
Institut de Biologie Structurale | Fax: +33-76.88.54.94
41, Ave. des Martyrs | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France | Nederlands/Francais
-------------------------------------------------------------------------------
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================