[Matrix-SIG] Re: NumPy core dump

Konrad Hinsen hinsen@cnrs-orleans.fr
Fri, 29 Jan 1999 20:24:54 +0100


> I found some other less-than-perfect behavior about the support of
> long integers in NumPy; for instance:
> 
> Python 1.5.2b2 (#17, Jan 13 1999, 00:17:47)  [GCC egcs-2.91.60 19981201 (e on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> from math import *
> >>> sqrt(4L)
> 2.0
> >>> from Numeric import *
> >>> sqrt(4L)
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> AttributeError: 'long int' object has no attribute 'sqrt'

Changing this would require
1) To make long int arrays a special case (not just general object
   arrays).
2) Implementing a square root function for long ints (which as far
   as I know does not exist.

I am not sure that the problem is important enough to be worth the
effort!

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