MCPcopy
hub / github.com/GPflow/GPflow / assert_params_false

Function assert_params_false

gpflow/utilities/model_utils.py:10–25  ·  view source on GitHub ↗

Asserts that parameters are ``False``. :param called_method: The method or function that is calling this. Used for nice error messages. :param kwargs: Parameters that must be ``False``. :raises NotImplementedError: If any ``kwargs`` are ``True``.

(
    called_method: Callable[..., Any],
    **kwargs: bool,
)

Source from the content-addressed store, hash-verified

8
9
10def assert_params_false(
11 called_method: Callable[..., Any],
12 **kwargs: bool,
13) -> None:
14 """
15 Asserts that parameters are ``False``.
16
17 :param called_method: The method or function that is calling this. Used for nice error messages.
18 :param kwargs: Parameters that must be ``False``.
19 :raises NotImplementedError: If any ``kwargs`` are ``True``.
20 """
21 errors_str = ", ".join(f"{param}={value}" for param, value in kwargs.items() if value)
22 if errors_str:
23 raise NotImplementedError(
24 f"{called_method.__qualname__} does not currently support: {errors_str}"
25 )
26
27
28@check_shapes(

Callers 15

predict_fMethod · 0.85
predict_fMethod · 0.85
predict_fMethod · 0.85
predict_yMethod · 0.85
predict_log_densityMethod · 0.85
predict_fMethod · 0.85
predict_fMethod · 0.85

Calls

no outgoing calls

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…