Apply a function to each member of a VTKCompositeDataArray. Returns a list of arrays. Note that this function is mainly for internal use by this module.
(func, array, args)
| 12 | from . import internal_algorithms as algs |
| 13 | |
| 14 | def _apply_func2(func, array, args): |
| 15 | """Apply a function to each member of a VTKCompositeDataArray. |
| 16 | Returns a list of arrays. |
| 17 | |
| 18 | Note that this function is mainly for internal use by this module.""" |
| 19 | if array is dsa.NoneArray: |
| 20 | return [] |
| 21 | res = [] |
| 22 | for a in array.Arrays: |
| 23 | if a is dsa.NoneArray: |
| 24 | res.append(dsa.NoneArray) |
| 25 | else: |
| 26 | res.append(func(a, *args)) |
| 27 | return res |
| 28 | |
| 29 | def apply_ufunc(func, array, args=()): |
| 30 | """Apply a function to each member of a VTKCompositeDataArray. |
no test coverage detected