Revision 5351e4fd9f7eaec7681c982d3f8657370776f42a authored by Artem Artemev on 14 June 2019, 18:59:30 UTC, committed by Artem Artemev on 14 June 2019, 18:59:30 UTC
1 parent b668794
Raw File
util.py
import numpy as np

from ..features import InducingPoints


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