def _to_np_float64(v):
    if (math.isnan(v) or math.isinf(v)):
        return np.inf
    return np.float64(v)
def _to_np_float64(v):
    if (math.isnan(v) or math.isinf(v)):
        return np.inf
    return np.float64(v)