def as_int(v):
    """ Converts a value to int by converting it first to float

    because calling ``int("2.3")`` raises a ValueError since 2.3 is
    not an integer. ``as_int("2.3")`` returns the same as ``int(2.3)``

    Args:
        v: a value convertible to numerical

    Returns:
        (int) the integer value of the given value

    """
    return int(float(v))