Beispiel #1
0
def _num_to_swipy(num: Union[int, float]):
    n = swipy.swipy_new_term_ref()
    if isinstance(num, int):
        swipy.swipy_put_integer(n, num)
    else:
        swipy.swipy_put_float(n, num)

    return n
Beispiel #2
0
def _num_to_swipy_ref(num: Union[int, float], swipy_ref):
    if isinstance(num, int):
        swipy.swipy_put_integer(swipy_ref, num)
    else:
        swipy.swipy_put_float(swipy_ref, num)