<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">OK Andy,
<br>
<br>
Thanks for that!<br>
<br>
I've compiled and installed Paraview from git'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.&nbsp; Is that a correct assumption? Is that the source of my problems???<br>
<br>
Thanks again for your help,<br>
&nbsp;&nbsp;&nbsp; Frank Horowitz<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF207859"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Andy Bauer [andy.bauer@kitware.com]<br>
<b>Sent:</b> Tuesday, September 04, 2012 7:57 PM<br>
<b>To:</b> Frank Horowitz<br>
<b>Cc:</b> paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Newbie question on Python Programmable Filters<br>
</font><br>
</div>
<div></div>
<div>Hi Frank,<br>
<br>
I didn'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 = ''</p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px">
ProgrammableFilter1.RequestInformationScript = ''</p>
<p style="margin:0px; text-indent:0px">ProgrammableFilter1.Script = 'x = inputs[0].PointData[\'RTData\']\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;)'</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?&nbsp; If it doesn't, I wonder if it'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 class="im">&gt; On 09/04/2012 02:20 PM, Frank Horowitz wrote:<br>
&gt; &gt;<br>
&gt; &nbsp;x = inputs[0].PointData['Scalars_']<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; &nbsp; &nbsp; &nbsp; x = numpy.array(inputs[0].PointData['Scalars_'])<br>
&gt;<br>
&gt; before doing anything with it.<br>
<br>
<br>
</div>
Computations after that style of construction hang too. &nbsp;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'll re-compile from source and report back on the results. &nbsp;Is the bug tracking system evident from the homepage?<br>
<br>
Cheers,<br>
&nbsp; &nbsp; &nbsp; &nbsp; Frank Horowitz<br>
<div class="HOEnZb">
<div class="h5"><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>
</body>
</html>