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

Function sum

Wrapping/Python/vtkmodules/numpy_interface/algorithms.py:153–169  ·  view source on GitHub ↗

Returns the sum of all values along a particular axis (dimension). Given an array of m tuples and n components: * Default is to return the sum of all values in an array. * axis=0: Sum values of all components and return a one tuple, n-component array. * axis=1: Sum values of al

(array, axis=None, controller=None)

Source from the content-addressed store, hash-verified

151
152@deprecated(version="9.6", message="Use np.sum() instead of algs.sum().")
153def sum(array, axis=None, controller=None):
154 """Returns the sum of all values along a particular axis (dimension).
155 Given an array of m tuples and n components:
156 * Default is to return the sum of all values in an array.
157 * axis=0: Sum values of all components and return a one tuple,
158 n-component array.
159 * axis=1: Sum values of all components of each tuple and return an
160 m-tuple, 1-component array.
161
162 When called in parallel, this function will sum across processes
163 when a controller argument is passed or the global controller is
164 defined. To disable parallel summing when running in parallel, pass
165 a dummy controller as follows:
166
167 sum(array, controller=vtkmodules.vtkParallelCore.vtkDummyController()).
168 """
169 return npalgs.sum(array, axis, controller)
170
171@deprecated(version="9.6", message="Use np.max() instead of algs.max().")
172def max(array, axis=None, controller=None):

Callers 14

mean_per_blockFunction · 0.70
__array_ufunc__Method · 0.70
normalizeFunction · 0.50
sumMethod · 0.50
meanMethod · 0.50
BinaryOperatorTestFunction · 0.50
averageMethod · 0.50
XdmfFunctionSumFunction · 0.50
mainFunction · 0.50
testNumpy2VTKMethod · 0.50

Calls 1

sumMethod · 0.45

Tested by 4

BinaryOperatorTestFunction · 0.40
testNumpy2VTKMethod · 0.40
magnitudeFunction · 0.40
dotFunction · 0.40