[Numpy-discussion] Bug: extremely misleading array behavior

Konrad Hinsen hinsen at cnrs-orleans.fr
Mon Jun 3 09:34:04 EDT 2002


> I don't think education is the answer here. We need to change
> Numeric to have uniform behavior across all typecodes.

I agree that this would be the better solution. But until this is
done...

> Having alternative behaviors for indexing based on the typecode can
> lead to very difficult to find bugs. Generic routines meant to work

The differences are not that important, in most circumstances rank-0
arrays and scalars behave in the same way. The problems occur mostly
with code that does explicit type checking.

The best solution, in my opinion, is to provide scalar objects
corresponding to low-precision ints and floats, as part of NumPy.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------




More information about the NumPy-Discussion mailing list