File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ def ZeroInterpolator(
7373 return 0.0
7474
7575
76+ _DEFAULT_INTERPOLATOR_MAPPING = {
77+ XGrid : ZeroInterpolator , # TODO v4: Update these to better defaults
78+ UxGrid : ZeroInterpolator ,
79+ }
80+
81+
7682def _assert_same_function_signature (f : Callable , * , ref : Callable ) -> None :
7783 """Ensures a function `f` has the same signature as the reference function `ref`."""
7884 sig_ref = inspect .signature (ref )
@@ -173,7 +179,7 @@ def __init__(
173179
174180 # Setting the interpolation method dynamically
175181 if interp_method is None :
176- self ._interp_method = ZeroInterpolator # Default to method that returns 0 always
182+ self ._interp_method = _DEFAULT_INTERPOLATOR_MAPPING [ type ( self . grid )]
177183 else :
178184 _assert_same_function_signature (interp_method , ref = ZeroInterpolator )
179185 self ._interp_method = interp_method
You can’t perform that action at this time.
0 commit comments