[SciPy-user] import scipy mangles types

John Hunter jdhunter at ace.bsd.uchicago.edu
Thu Apr 22 12:15:36 CDT 2004

Here's an interesting bug.

from Matrix import Matrix
import scipy

produces the traceback
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.3/site-packages/Numeric/Matrix.py", line 69, in __init__
    if type(data) is types.StringType:
AttributeError: 'NoneType' object has no attribute 'StringType'

The types module (used by Matrix) is being replaced by None if scipy
is imported after Matrix.

If I import scipy before I import Matrix, I have no troubles

import scipy
from Matrix import Matrix

This is a CVS scipy, circa Feb 10 2004.  Haven't checked against 0.3.


More information about the SciPy-user mailing list