<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Hi,</div><div><br></div><div>I need to use Numpy in a lot of the programmable filters that I write, and I've run into differences in how its masking feature works in serial and parallel. Masking allows one to filter out portions of an array that do not pass some condition.<br></div><div><br></div><div>As an example, I've created a stock paraview wavelet, and saved it as a pvd file. I then load it in, and run this inside of a programmable filter:</div><div>---<br></div><div>import numpy<br><br>data = inputs[0].PointData['RTData']</div><div># create a mask that tells us which points are equal to one<br>mask = numpy.ma.masked_equal(data, 1)</div><div># filter data array by the mask conditions (so that other points are excluded)<br>maskedPnts = numpy.extract(mask, data)<br><br>print
len(maskedPnts)</div><div><br></div><div>---</div><div>In serial mode, I get 9261 points. With two processes, I get 2 x 4851 or 9702. So masking always produces more points.</div><div><br></div><div>Any ideas to why that is? Is there anything I can do/print out to see why masking doesn't quite work in parallel?</div><div><br></div><div>Thanks, Sohail</div></div></body></html>