On Tue, Nov 3, 2009 at 10:08 AM, Kun-Dar Li <[email protected]> wrote:
>
> Hi Daniel,
>
> Sorry for bothering you again. I got an error when I try the following:
>
>>   for z in z3D:
>>           z2D = z * numerix.ones(len(x2D))
>>          mask = var3D((x2D, y2D, z2D)) > 0.5
>>          var2D[mask] = z
>>

That should work, but something is broken somewhere. This should work

    var2D.setValue(z, where=mask)

to replace the last line.

>
>>>>
> Traceback (most recent call last):
>  in <module> var2D[mask] = z
>  File "C:\Python25\lib\site-packages\fipy\variables\variable.py", line 429,
> in __setitem__
>   self.value[index] = value
> IndexError: unsupported iterator index
>>>>
>
> I don't know how to fix it. Please give me a hint. Many thanks for your
> help.
>
> Kundar
>
>
>
>
>
>



-- 
Daniel Wheeler

Reply via email to