[PYTHON MATRIX-SIG] Re: max/min bug

Konrad Hinsen hinsen@ibs.ibs.fr
Tue, 28 Jan 1997 12:31:48 +0100


> Two ways are possible, rename to mmax,mmin or ask in the function for
> type of m and return the appropiate result, if it is something other
> than an array. I think the second way is error prone, because of
> possible other numerical objects. Or are there better indicators than
> 'type()'?

The real question is, indicators for what? How do you want to treat
min([[2.5, 6.], [0., 3.]])? It ought to work like before, of course,
for compatibility, so it should compare two lists by address. On the
other hand, most array functions also accept nested lists as arguments,
so once you pretend that min() is an array function, you create
confusion.

Better use other names!

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. 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
_______________