lale/search/PGO.py
def freqsAsFloatValues(
    freqs: Iterable[Tuple[Any, int]],
    inclusive_min: Optional[float] = None,
    inclusive_max: Optional[float] = None,
) -> Iterator[Tuple[Defaultable[float], int]]:
    """maps the str values to integers, and skips anything that does not look like an integer"""
    for v, f in freqs:
        try:
            if v == DEFAULT_STR:
                yield _default_value, f
                continue
            i = float(v)
            if inclusive_min is not None and inclusive_min > i:
                continue
            if inclusive_max is not None and inclusive_max < i:
                continue

            yield i, f
        except ValueError:
            pass
maps the str values to integers, and skips anything that does not look like an integer
maps the str values to integers, and skips anything that does not look like an integer
maps the str values to integers and skips anything that does not look like an integer
def freqsAsFloatValues(
    freqs: Iterable[Tuple[Any, int]],
    inclusive_min: Optional[float] = None,
    inclusive_max: Optional[float] = None,
) -> Iterator[Tuple[Defaultable[float], int]]:
    for v, f in freqs:
        try:
            if v == DEFAULT_STR:
                yield _default_value, f
                continue
            i = float(v)
            if inclusive_min is not None and inclusive_min > i:
                continue
            if inclusive_max is not None and inclusive_max < i:
                continue
            yield i, f
        except ValueError:
            pass
def freqsAsFloatValues ( freqs : Iterable [ Tuple [ Any , int ] ] , inclusive_min : Optional [ float ] = None , inclusive_max : Optional [ float ] = None , ) -> Iterator [ Tuple [ Defaultable [ float ] , int ] ] : for v , f in freqs : try : if v == DEFAULT_STR : yield _default_value , f continue i = float ( v ) if inclusive_min is not None and inclusive_min > i : continue if inclusive_max is not None and inclusive_max < i : continue yield i , f except ValueError : pass
maps the str values to integers, and skips anything that does not look like an integer
maps the str values to integers and skips anything that does not look like an integer
"""maps the str values to integers, and skips anything that does not look like an integer"""
freqs
Iterable[Tuple[Any, int]]
inclusive_min
Optional[float]
inclusive_max
Optional[float]