Skip to content

Latest commit

 

History

History
146 lines (93 loc) · 3.2 KB

api.rst

File metadata and controls

146 lines (93 loc) · 3.2 KB
.. default-domain:: py
.. currentmodule:: fastnumbers

fastnumbers API

Each of these functions acts as a (potentially) faster drop-in replacement for the equivalent Python built-in function. Please perform timing tests on your platform with your data to determine if these functions will actually provide you with a speed-up.

.. autofunction:: float

.. autofunction:: int

.. autofunction:: real

Each of these functions will quickly convert strings to numbers (and also numbers to numbers) with fast and convenient error handling. They are guaranteed to return results identical to the built-in float or int functions.

.. autofunction:: try_real

.. autofunction:: try_float

.. autofunction:: try_int

.. autofunction:: try_forceint

These functions return a Boolean value that indicates if the input can return a certain number type or not.

.. autofunction:: check_real

.. autofunction:: check_float

.. autofunction:: check_int

.. autofunction:: check_intlike

.. autofunction:: query_type

These functions have a less flexible interface than try_* functions, but otherwise do the same thing. New code should prefer the try_* functions instead, but the below functions will never be removed.

.. autofunction:: fast_real

.. autofunction:: fast_float

.. autofunction:: fast_int

.. autofunction:: fast_forceint

These functions have a less flexible interface than check_* functions, but otherwise do the same thing. New code should prefer the check_* functions instead, but the below functions will never be removed.

.. autofunction:: isreal

.. autofunction:: isfloat

.. autofunction:: isint

.. autofunction:: isintlike