[SciPy-user] mixing scipy and Numeric

Travis E. Oliphant oliphant.travis at ieee.org
Mon Dec 26 00:05:32 CST 2005

Christian Kristukat wrote:
> Hi,
> again I've got problems with old code that relies on Numeric when imported in 
> some other program that uses scipy_core.
> Numeric.log10 has problems with a type called
> <type 'float64_arrtype'>.
> A ValueError is raised when passing a variable of that type. The strange thing 
> is that that variable has been created by pure Numeric code.
> Where does that type belong to? scipy or Numeric or plain python? What does the 
> suffix _arrtype suggest since it seems to be an ordinary float?

This type definitely belongs to scipy_core.  Scipy_core contains array 
scalars which are special scalars that have the methods and attributes 
of arrays but inherit from Python scalars where they can.  You get one 
whenever you access the elements of an array.  Here, the float64 should 
act like a Python float (because it inherits from it).  On my system 
Numeric.log10 works fine with these array scalars, so perhaps something 
else is causing the problem.


More information about the SciPy-user mailing list