Recursively fill `a` with `fill_value`.
(a, mask, fill_value)
| 2473 | |
| 2474 | |
| 2475 | def _recursive_filled(a, mask, fill_value): |
| 2476 | """ |
| 2477 | Recursively fill `a` with `fill_value`. |
| 2478 | |
| 2479 | """ |
| 2480 | names = a.dtype.names |
| 2481 | for name in names: |
| 2482 | current = a[name] |
| 2483 | if current.dtype.names is not None: |
| 2484 | _recursive_filled(current, mask[name], fill_value[name]) |
| 2485 | else: |
| 2486 | np.copyto(current, fill_value[name], where=mask[name]) |
| 2487 | |
| 2488 | |
| 2489 | def flatten_structured_array(a): |