On Oct 11, 2006, at 11:24 AM, Jonathan Guyer wrote:

I believe the problem is that you have installed a version of SciPy that is too new. As explained at <http://wwwctcms.nist.gov/fipy/installation.html#scipy>, FiPy does not require SciPy but, if present, it can only use version 0.3.x of SciPy. I get the error you see when I import version 0.4.x or 0.5.x of SciPy.

The version of scipy that one automatically gets with enthought python is not a version that is compatible with
Numeric, but is compatible with the newer numpy. FiPy requires the use of Numeric and does not work
with numpy.

When you use scipy it is returning numpy arrays, which will not always work with FiPy. Try to use Numeric
wherever you can. If you need to use scipy, then use Numeric.array in the way demonstrated below. I haven't
tested this, but it should fix the problem in this case.

import scipy

import Numeric, scipy

# sigma & M
sigma=sigmaGb*scipy.ones((numPhases,numPhases))

sigma=sigmaGb*Numeric.ones((numPhases,numPhases))

M=Mgb*scipy.ones((numPhases,numPhases))

M=Mgb*Numeric.ones((numPhases,numPhases))

sigma-=sigmaGb*scipy.eye(numPhases,numPhases)

sigma-=sigmaGb*Numeric.array(scipy.eye(numPhases,numPhases))

M-=Mgb*scipy.eye(numPhases,numPhases)

M-=Mgb*Numeric.array(scipy.eye(numPhases,numPhases))

--
Daniel Wheeler


Reply via email to