https://github.com/GPflow/GPflow
Raw File
Tip revision: 4f1faf11ce53037efcdd3ed60be52646c3206222 authored by Sergio Diaz on 10 September 2019, 15:11:24 UTC
SGPR and FITC updated
Tip revision: 4f1faf1
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