... 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 <[email protected]> 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 <[email protected]> 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 ?
>>
>
>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview