Re: [Paraview] Calculator speed

2008-09-11 Thread Berk Geveci
(assuming you are using cvs paraview) In the programmable filter, you can do something like: from paraview import numpy_support input = self.GetInputDataObject(0, 0) ar = numpy_support.vtk_to_numpy(input.GetPointData().GetArray(pressure)) ar2 = ar*2 newArray = nump7_support.numpy_to_vtk(ar2,

Re: [Paraview] Calculator speed

2008-09-11 Thread Weirs, V Gregory
Dig it. Is numpy_support documented anywhere? Thanks, Greg On 9/11/08 10:31 AM, Berk Geveci [EMAIL PROTECTED] wrote: (assuming you are using cvs paraview) In the programmable filter, you can do something like: from paraview import numpy_support input = self.GetInputDataObject(0, 0) ar =

Re: [Paraview] Calculator speed

2008-09-11 Thread Berk Geveci
It will be once we update the wiki pages :-) On Thu, Sep 11, 2008 at 1:18 PM, Weirs, V Gregory [EMAIL PROTECTED] wrote: Dig it. Is numpy_support documented anywhere? Thanks, Greg On 9/11/08 10:31 AM, Berk Geveci [EMAIL PROTECTED] wrote: (assuming you are using cvs paraview) In the

Re: [Paraview] Calculator speed

2008-09-11 Thread pat marion
Or in the meantime... from paraview import numpy_support help(numpy_support) Help on module paraview.numpy_support in paraview: NAME paraview.numpy_support FILE /source/paraview/streaming-release/build/Utilities/VTKPythonWrapping/paraview/numpy_support.py DESCRIPTION This

Re: [Paraview] Calculator speed

2008-09-09 Thread Moreland, Kenneth
Tobias, I would agree that the parsing of calculator expressions is probably slowing down the calculations. I also agree that a custom filter would be the easiest way to fix the problem (and would probably simplify things for users). -Ken On 9/9/08 6:58 AM, Tobias Brandvik [EMAIL PROTECTED]