[PYTHON MATRIX-SIG] Just checking in
Konrad Hinsen
hinsen@ibs.ibs.fr
Thu, 29 Aug 96 16:05:01 +0100
> If you have any opinions on the whole naming conventions/default axis issue
> that has been recently discussed I'd like to hear them. I still haven't
> found a proposal that I like better than my current version:
>
> All default axes are 0
> Functions like fft, sort, argmax, ... should generally be called with an
> explicit axis specification of -1. ie. fft(wave, axis=-1). This explicit
> axis specification is only necessary when working on 2 or more dimensional
> arrays.
I still think that a two-class system (structural functions with a
default axis of zero, others with a default of 1) is the better
solution.
But I mainly write to express dissatisfaction with the way dot() works
now. I have been doing some matrix work recently, and not being able
to use dot() for matrix multiplication is a real nuisance. I ended up
redefining dot() to be LinAlg._dot2, which is exactly the kind of
thing to be avoided.
So unless someone can give a good argument (preferably based on a
real-life application) that dot() should behave as it does now, I
propose that dot() should act along axis -1 of its first and axis 0 of
its second argument. This is the right choice for scalar products,
matrix-vector multiplication, and matrix-matrix multiplication. I
think these are more frequent than list-of-vector scalar products.
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
-------------------------------------------------------------------------------
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================