https://github.com/GPflow/GPflow
Raw File
Tip revision: 00073d8dfa0c4cee80597fe8adb0324a7f72e7a5 authored by Sergio Diaz on 16 September 2019, 10:10:17 UTC
Merge branch 'awav/gpflow-2.0' into sergio_pasc/gpflow-2.0/ordinal_regression
Tip revision: 00073d8
util.py
import numpy as np

from ..inducing_variables import InducingPoints


def inducingpoint_wrapper(inducing_variable):
    """
    Models which used to take only Z can now pass `inducing_variable` and `Z` to this method. This method will
    check for consistency and return the correct inducing_variable. This allows backwards compatibility in
    for the methods.
    """
    if isinstance(inducing_variable, np.ndarray):
        inducing_variable = InducingPoints(inducing_variable)
    return inducing_variable
back to top