MCPcopy Create free account
hub / github.com/numpy/numpy / _check_interpolation_as_method

Function _check_interpolation_as_method

numpy/lib/function_base.py:4577–4591  ·  view source on GitHub ↗
(method, interpolation, fname)

Source from the content-addressed store, hash-verified

4575
4576
4577def _check_interpolation_as_method(method, interpolation, fname):
4578 # Deprecated NumPy 1.22, 2021-11-08
4579 warnings.warn(
4580 f"the `interpolation=` argument to {fname} was renamed to "
4581 "`method=`, which has additional options.\n"
4582 "Users of the modes 'nearest', 'lower', 'higher', or "
4583 "'midpoint' are encouraged to review the method they used. "
4584 "(Deprecated NumPy 1.22)",
4585 DeprecationWarning, stacklevel=4)
4586 if method != "linear":
4587 # sanity check, we assume this basically never happens
4588 raise TypeError(
4589 "You shall not pass both `method` and `interpolation`!\n"
4590 "(`interpolation` is Deprecated in favor of `method`)")
4591 return interpolation
4592
4593
4594def _compute_virtual_index(n, quantiles, alpha: float, beta: float):

Callers 2

percentileFunction · 0.85
quantileFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected