On Mon, Dec 1, 2008 at 2:58 PM, Ionut Vancea <[EMAIL PROTECTED]> wrote:
>
> On Mon, Dec 1, 2008 at 3:20 PM, Daniel Wheeler
> <[EMAIL PROTECTED]> wrote:
>>
>> PS You'll find the gist viewer much faster than matplotlib for"
>> everyday plotting. See  the Pygist section on
>> <http://www.ctcms.nist.gov/fipy/installation.html>.
>
>
> I installed the package but doesn't work the examples with it, for example:
>
> [EMAIL PROTECTED]:~/pywork/CURRENT> python examples/cahnHilliard/input2D.py
> <..SKIP...>
>    from slice3 import *
>  File "/usr/local/lib64/python2.5/site-packages/gist/slice3.py", line
> 1581, in <module>
>    _poly_permutations4 = _construct3 (0)
>  File "/usr/local/lib64/python2.5/site-packages/gist/slice3.py", line
> 1575, in _construct3
>    mask = find_mask (below, _node_edges3 [itype])
> TypeError: Array can not be safely cast to required type

This seems to be an issue with pygist. I've seen it before, but I
can't recall what the answer was. Maybe try installing the old Numeric
python. I think that pygist requires this.

   <http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=1351>

Alternatively, you can just plot stuff less frequently with matplotlib.

> The other example:
>
> [EMAIL PROTECTED]:~/pywork/CURRENT> python 
> examples/cahnHilliard/inputTanh1D.py
> Traceback (most recent call last):
>  File "examples/cahnHilliard/inputTanh1D.py", line 233, in <module>
>    exec(fipy.tests.doctestPlus._getScript())
>  File "<string>", line 166, in <module>
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/term.py",
> line 121, in solve
>    matrix, RHSvector = self.__buildMatrix(var, boundaryConditions, dt)
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/term.py",
> line 88, in __buildMatrix
>    return self._buildMatrix(var, boundaryConditions, dt)
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/binaryTerm.py",
> line 66, in _buildMatrix
>    termMatrix, termRHSvector = self.term2._buildMatrix(var,
> boundaryConditions, dt = dt)
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/binaryTerm.py",
> line 64, in _buildMatrix
>    matrix, RHSvector = self.term1._buildMatrix(var,
> boundaryConditions, dt = dt)
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/diffusionTerm.py",
> line 272, in _buildMatrix
>    self._getCoefficientMatrix(mesh, self.coeffDict['cell 1 diag']),
> numerix.zeros(N,'d'))
>  File "/usr/local/lib64/python2.5/site-packages/fipy/terms/diffusionTerm.py",
> line 167, in _getCoefficientMatrix
>    interiorCoeff = numerix.take(interiorCoeff, mesh._getCellFaceIDs())
>  File "/usr/local/lib64/python2.5/site-packages/fipy/tools/numerix.py",
> line 1231, in take
>    taken = taken.filled()
> AttributeError: 'numpy.ndarray' object has no attribute 'filled'

Again, this seems to be an issue with numpy. I didn't have this
problem with the CURRENT branch and numpy version 1.2.1. What version
of numpy do you have?

-- 
Daniel Wheeler

Reply via email to