Пример #1
0
def interp1d(value):
    if isinstance(value, interpolate.interp1d):
        logger.debug(value)
        kind = bytes(value._kind, "utf-8")
        data = (value.x, value.y, kind, value.axis, value.copy, value.bounds_error)
        value = ("interp1d", data)
    return value
Пример #2
0
def dicts(value):
    logger.debug("Value: ", value)
    if (isinstance(value, list) and len(value) > 0
            and isinstance(value[0], np.ndarray)):
        pass
    else:
        value = lfe_decoders.dicts(value)
    return value
Пример #3
0
def interp1d(value):
    if isinstance(value, interpolate.interp1d):
        logger.debug(value)
        kind = bytes(value._kind, "utf-8")
        data = (value.x, value.y, kind, value.axis, value.copy,
                value.bounds_error)
        value = ("interp1d", data)
    return value
Пример #4
0
def dicts(value):
    logger.debug("Value: ", value)
    if (isinstance(value, list)
        and len(value) > 0
        and isinstance(value[0], np.ndarray)):
        pass
    else:
        value = lfe_decoders.dicts(value)
    return value
Пример #5
0
def interp1d(value):
    if (isinstance(value, tuple)
        and len(value) == 2
        and value[0] == erlang.List("interp1d")):
        logger.debug(value)
        (x, y, kind, axis, copy, bounds_error) = value[1]
        kind = kind.decode("utf-8")
        value = interpolate.interp1d(
            x, y, kind=kind, axis=axis, copy=copy,
            bounds_error=bounds_error)
    return value
Пример #6
0
def interp1d(value):
    if (isinstance(value, tuple) and len(value) == 2
            and value[0] == erlang.List("interp1d")):
        logger.debug(value)
        (x, y, kind, axis, copy, bounds_error) = value[1]
        kind = kind.decode("utf-8")
        value = interpolate.interp1d(x,
                                     y,
                                     kind=kind,
                                     axis=axis,
                                     copy=copy,
                                     bounds_error=bounds_error)
    return value