[Paraview] ... something really weird.... dependance with matplotlib version ?

Aurélien Marsan aur.marsan at gmail.com
Wed Sep 15 08:54:52 EDT 2010


... Ok.... I think this is rather a dependance with the version of vtk.

Doing this in a programmable filter in paraview

from paraview import vtk

i = self.GetInput()

o = self.GetOutput()

b = i.GetBlock(1)

c = vtk.vtkArrayCalculator()

c.SetInput(b)

c.SetFunction('1.4')

c.SetResultArrayName('test')

c.Update()

print c.GetOutput().GetPointData().GetArray('test').GetTuple1(1)

it prints 1.0


While doing this in the python console, il prints 1.4


... I think I should use pvpython, in order to work with the same version of
vtk ...


Le 15 septembre 2010 14:26, Aurélien Marsan <aur.marsan at gmail.com> a écrit :

> I give more precisions : it seems that it comes from the "." and the "," in
> the numbers...
>
> Le 15 septembre 2010 14:24, Aurélien Marsan <aur.marsan at gmail.com> a écrit
> :
>
> Hi,
>>
>> Upgrading my version of matplotlib, I encountered a really weird problem.
>>
>> Before, with the 0.99.1.1 version of matplotlib, I could calculate (in the
>> calculator),
>> e_interne*(1.4-1)/286.95 without any problem.
>>
>> After upgrading, the result of this calculation is zero everywhere...
>>
>> Is there any explanation for this ?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100915/368a1b5b/attachment.htm>


More information about the ParaView mailing list