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.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for finitefloat-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063a03012ef2a483a8b9ed09af1ca1f37fd6c290ea990c97ea3ff6acb2ab237f |
|
MD5 | 71532666c37394b85da1d1f85385a21a |
|
BLAKE2b-256 | 554afdcd6355ce7400b6dc87bdc123b89df8ea357565e2ac97d8e2d80a341ac6 |