

def check_hyperparams_dict(hypers):
    if (type(hypers) is not dict):
        raise TypeError('hypers should be a dict')
    keys = ['a', 'b', 'kappa']
    for key in value:
        if (key not in hypers):
            raise KeyError(('missing key in hypers: %r' % (key,)))
    for (key, value) in six.iteritems(hypers):
        if (key not in keys):
            raise KeyError(('invalid hypers key: %r' % (key,)))
        if (not isinstance(value, (float, numpy.float64))):
            raise TypeError(('%r should be float' % (key,)))
        if (key in ['a', 'kappa']):
            if (value <= 0.0):
                raise ValueError(('hypers[%r] should be greater than 0' % (key,)))
        if (key == 'b'):
            if ((value <= 0.0) or (value >= (2 * pi))):
                raise ValueError(('hypers[%r] should be in [0,2*pi]' % (key,)))

dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py check_hyperparams_dict/VarMisuse@43/68 `keys`->`value`