Finite (non-nan, non-inf) float
Project description
finitefloat
Finite (non-nan, non-inf) float.
Usage
import math
from finitefloat import NotFinite, finitefloat
value: finitefloat = finitefloat(0.1)
try:
value = finitefloat(math.nan)
except NotFinite:
print("The value is not finite.")
API
Module finitefloat
class finitefloat(x: Union[SupportsFloat, SupportsIndex, str, bytes, bytearray])
Subclass of float
.
Raise NotFinite
exception if float(x)
is nan or ±inf.
class NotFinite
Subclass of ValueError
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
finitefloat-0.1.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for finitefloat-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16a620271ae2fe44c3f20ca6ad1d8a1c16d5c8d7eb94d375323bbb694e91a39 |
|
MD5 | 6a96169b949f57d26482eb479b3abe17 |
|
BLAKE2b-256 | e8affb657446c6ce21d106b5e35dc8ec68c11597e481b041a472c9c26fd69393 |