Returns the min of all values along a particular axis (dimension) for each block of a VTKCompositeDataArray. Given an array of m tuples and n components: * Default is to return the min of all values in an array. * axis=0: Return the min values of all components and return a one
(array, axis=None, controller=None)
| 452 | return _global_per_block(MaxPerBlockImpl(), array, axis, controller) |
| 453 | |
| 454 | def min_per_block(array, axis=None, controller=None): |
| 455 | """Returns the min of all values along a particular axis (dimension) |
| 456 | for each block of a VTKCompositeDataArray. |
| 457 | Given an array of m tuples and n components: |
| 458 | * Default is to return the min of all values in an array. |
| 459 | * axis=0: Return the min values of all components and return a one |
| 460 | tuple, n-component array. |
| 461 | * axis=1: Return the min values of all components of each tuple and |
| 462 | return an m-tuple, 1-component array. |
| 463 | |
| 464 | When called in parallel, this function will compute the min across |
| 465 | processes when a controller argument is passed or the global controller |
| 466 | is defined. To disable parallel summing when running in parallel, pass a |
| 467 | dummy controller as follows: |
| 468 | |
| 469 | min_per_block(array, controller=vtkmodules.vtkParallelCore.vtkDummyController()). |
| 470 | """ |
| 471 | class MinPerBlockImpl: |
| 472 | def op(self): |
| 473 | return min |
| 474 | |
| 475 | def op2(self): |
| 476 | return algs.min |
| 477 | |
| 478 | def mpi_op(self): |
| 479 | from mpi4py import MPI |
| 480 | return MPI.MIN |
| 481 | |
| 482 | def default(self): |
| 483 | return numpy.finfo(numpy.float64).max |
| 484 | |
| 485 | return _global_per_block(MinPerBlockImpl(), array, axis, controller) |
| 486 | |
| 487 | @deprecated(version="9.6", message="Use np.all() instead of algs.all().") |
| 488 | def all(array, axis=None, controller=None): |
nothing calls this directly
no test coverage detected