helper function to select the appropriate interpolator class returns interpolator class and keyword arguments for the class
(method, **kwargs)
| 544 | |
| 545 | |
| 546 | def _get_interpolator_nd(method, **kwargs): |
| 547 | """helper function to select the appropriate interpolator class |
| 548 | |
| 549 | returns interpolator class and keyword arguments for the class |
| 550 | """ |
| 551 | valid_methods = tuple(get_args(InterpnOptions)) |
| 552 | if method in valid_methods: |
| 553 | kwargs.update(method=method) |
| 554 | kwargs.setdefault("bounds_error", False) |
| 555 | interp_class = _import_interpolant("interpn", method) |
| 556 | else: |
| 557 | raise ValueError( |
| 558 | f"{method} is not a valid interpolator for interpolating " |
| 559 | "over multiple dimensions." |
| 560 | ) |
| 561 | |
| 562 | return interp_class, kwargs |
| 563 | |
| 564 | |
| 565 | def _get_valid_fill_mask(arr, dim, limit): |
no test coverage detected
searching dependent graphs…