MCPcopy Create free account
hub / github.com/Kitware/VTK / fill_array

Function fill_array

IO/Parallel/Testing/Python/TestEnSightWriterVariables.py:31–33  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

29
30# Create testing variables
31def fill_array(arr):
32 for i in range(arr.GetNumberOfTuples()):
33 arr.SetTuple(i, [1000*(i+1) + (j+1) for j in range(arr.GetNumberOfComponents())])
34
35for dimension, name in [(1, "PointScalars"), (3, "PointVectors"), (6, "PointTensors6"), (9, "PointTensors9")]:
36 arr = vtk.vtkFloatArray()

Callers 1

Calls 4

rangeClass · 0.50
GetNumberOfTuplesMethod · 0.45
SetTupleMethod · 0.45
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected