<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><div>Dear Paraview folks,<br><br></div>It seems there is a mistake in the Paraview User's Guide at the end of the section Python Calculator.<br><br>To create a multi-component field from multiple scalar fields, hstack used to work before Paraview 4.2.0.<br><br></div>But since Paraview 4.2.0, we must use numpy.column_stack. This change may have been caused by the great work done in 4.2.0 to be able to use numpy arrays as vtk arrays with automatic conversion from numpy to vtk and inversely.<br><br></div>Using hstack will create a dataset with many components (number of nodes times the number of field in hstack).<br><br></div>For instance, create a sphere source with default properties.<br><br></div>In Paraview 4.1.0, use this formula to create the same field as Normals:<br>hstack((Normals[:,0], Normals[:,1], Normals[:,2]))<br><br>In Paraview 4.2.0 and 4.3.1, if you use numpy.hstack((Normals[:,0], Normals[:,1], Normals[:,2])), you will get a field with 150 components, since the default sphere has 50 points. And it may lead to a memory oversize for a source with thousands points.<br><br>In Paraview 4.2.0 and 4.3.1, the following formula gives the wanted result: <br>numpy.column_stack((Normals[:,0], Normals[:,1], Normals[:,2]))<br><br></div>Note that you must change the name of the result, otherwise the number of components is not updated between two different formulas. This might be a bug.<br><br></div><div>I have not found where the latex documentation is. Is it available somewhere as a git repository? What is the policy on contributing to it?<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><br></div>Christophe<br></font></span></div>
</div><br></div>