| 352 | sum_per_block(array, controller=vtkmodules.vtkParallelCore.vtkDummyController()). |
| 353 | """ |
| 354 | class SumPerBlockImpl: |
| 355 | def op(self): |
| 356 | return sum |
| 357 | |
| 358 | def op2(self): |
| 359 | return algs.sum |
| 360 | |
| 361 | def mpi_op(self): |
| 362 | from mpi4py import MPI |
| 363 | return MPI.SUM |
| 364 | |
| 365 | def default(self): |
| 366 | return numpy.float64(0) |
| 367 | |
| 368 | return _global_per_block(SumPerBlockImpl(), array, axis, controller) |
| 369 |