MCPcopy Create free account
hub / github.com/Kitware/ParaView / print_array

Function print_array

Remoting/Application/Testing/Python/PythonFilters.py:21–33  ·  view source on GitHub ↗
(vtkarray, verbose=0)

Source from the content-addressed store, hash-verified

19# it will be called with a loop, it offers the option to display the entire
20# array or just the first few tuples. This is mainly used for debug.
21def print_array (vtkarray, verbose=0) :
22 ntuples = min(3, vtkarray.GetNumberOfTuples())
23 if verbose : ntuples = max(3, vtkarray.GetNumberOfTuples())
24
25 ncomps = min(6, vtkarray.GetNumberOfComponents())
26 if verbose : ncomps = max(6, vtkarray.GetNumberOfComponents())
27
28 for i in range(ntuples) :
29 for j in range(ncomps) :
30 print "%+12.6f" % vtkarray.GetComponent(i, j),
31 sys.stdout.flush()
32 print ''
33 sys.stdout.flush()
34
35# test0 tests all python programmable filters that work with data array
36# associated with points/cells. The data array could be an array of

Callers 2

test0Function · 0.85
test1Function · 0.85

Calls 4

minFunction · 0.85
maxFunction · 0.85
GetComponentMethod · 0.80
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected