I&#39;m not sure I completely understand about your inputs[0]. As for iterating over time with the python programmable filter, inside the filter it will only have access to values from a single time step at each invocation of RequestData(). You can think of the order of operations if you have 5 time steps as:<br>
1) iterate over each of the 5 time steps (i.e. load a file and update the pipeline with that data set)<br>2) update the python programmable filter output for the current data set resulting from the loaded file<br><br>If you want time statistics for your variables I think you probably want to use the calculator filter to square the value at each point and then use the temporal statistics filter to get an average of those values. After that you can just multiply the results by the number of time steps.<br>
<br>If I&#39;m misunderstanding what you&#39;re trying to do, I&#39;d suggest giving a description of what you&#39;re trying to do and maybe there&#39;s a simpler way of doing it.<br><br>Andy<br><br><div class="gmail_quote">
On Wed, Sep 5, 2012 at 2:56 PM, Frank Horowitz <span dir="ltr">&lt;<a href="mailto:frank.horowitz@cornell.edu" target="_blank">frank.horowitz@cornell.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">OK Andy,
<br>
<br>
Thanks for that!<br>
<br>
I&#39;ve compiled and installed Paraview from git&#39;s release branch, and (a slight modification) of your code runs correctly. I think that means that my paraview/python integration is semi-sane.<br>
<br>
However, my problem still occurs. Recall that I have a time series of .vtu files (indexed by integers built-in to their filenames) being fed into inputs[0] (at least as I understand it).<br>
<br>
In my original code snippet, I assumed that the &quot;m = x*x&quot; statement would iterate not only over the point values of the spatial array, but also over all timeslices.  Is that a correct assumption? Is that the source of my problems???<br>

<br>
Thanks again for your help,<br>
    Frank Horowitz<br>
<br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> Andy Bauer [<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>]<br>
<b>Sent:</b> Tuesday, September 04, 2012 7:57 PM<br>
<b>To:</b> Frank Horowitz<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] Newbie question on Python Programmable Filters<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>Hi Frank,<br>
<br>
I didn&#39;t have a problem with the following on my windows machine using the ParaView 3.14.1 installer.
<br>
=======<br>
try: paraview.simple
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
except: from paraview.simple import *</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
paraview.simple._DisableFirstRenderCameraReset()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Wavelet1 = Wavelet()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
RenderView1 = GetRenderView()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
ProgrammableFilter1 = ProgrammableFilter()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
ProgrammableFilter1.PythonPath = &#39;&#39;</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
ProgrammableFilter1.RequestInformationScript = &#39;&#39;</p>
<p style="margin:0px;text-indent:0px">ProgrammableFilter1.Script = &#39;x = inputs[0].PointData[\&#39;RTData\&#39;]\nprint &quot;x shape =&quot;,x.shape\n\nm = x*x # I _thought_ this should run at numpy speeds?\nprint &quot;m shape=&quot;,m.shape\n\n# more debugging code to finish computation
 of the norm omitted\n\noutput.PointData.append(m,&quot;Displacement Norm&quot;)&#39;</p>
<p style="margin:0px;text-indent:0px">Show()</p>
<p style="margin:0px;text-indent:0px">Render()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
=============<br>
</p>
<br>
Does this work for you?  If it doesn&#39;t, I wonder if it&#39;s an issue with having multiple pythons and numpy or system environments causing problems. What version of paraview are you using and how did you get it built/installed on your machine?<br>

<br>
Andy<br>
<br>
<div class="gmail_quote">On Tue, Sep 4, 2012 at 6:04 PM, Frank Horowitz <span dir="ltr">
&lt;<a href="mailto:frank.horowitz@cornell.edu" target="_blank">frank.horowitz@cornell.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hal Canary wrote on Tue Sep 4 15:22:01 EDT 2012:<br>
<div>&gt; On 09/04/2012 02:20 PM, Frank Horowitz wrote:<br>
&gt; &gt;<br>
&gt;  x = inputs[0].PointData[&#39;Scalars_&#39;]<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I thought one needs to convert a vtkarray to a numpy array with<br>
&gt;<br>
&gt;       x = numpy.array(inputs[0].PointData[&#39;Scalars_&#39;])<br>
&gt;<br>
&gt; before doing anything with it.<br>
<br>
<br>
</div>
Computations after that style of construction hang too.  To my eye, the results of such an expression should be 100% standard numpy, obeying 100% standard numpy semantics.<br>
<br>
It appears that there is a bug in numpy integration to the Python Programmable Filter.<br>
<br>
I&#39;ll re-compile from source and report back on the results.  Is the bug tracking system evident from the homepage?<br>
<br>
Cheers,<br>
        Frank Horowitz<br>
<div>
<div><br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br>