示例#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