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)
| 151 | |
| 152 | @deprecated(version="9.6", message="Use np.sum() instead of algs.sum().") |
| 153 | def 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().") |
| 172 | def max(array, axis=None, controller=None): |