Skip to main content

Finite (non-nan, non-inf) float

Project description

finitefloat

PyPI PyPI - Python Version Code style: black license

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


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 details)

Uploaded Source

Built Distribution

finitefloat-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file finitefloat-0.1.1.tar.gz.

File metadata

  • Download URL: finitefloat-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/2.7.12 Darwin/20.2.0

File hashes

Hashes for finitefloat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c490e9df5a27782f330141b70d432d2138ba4aa1d40dba50486cc0333bf112c1
MD5 f762d453ba8b24a940987b6e348ebbf9
BLAKE2b-256 5760107d73314a93785622beb497df190951239f6be23c827b5343d0cead11b0

See more details on using hashes here.

File details

Details for the file finitefloat-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: finitefloat-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/2.7.12 Darwin/20.2.0

File hashes

Hashes for finitefloat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e16a620271ae2fe44c3f20ca6ad1d8a1c16d5c8d7eb94d375323bbb694e91a39
MD5 6a96169b949f57d26482eb479b3abe17
BLAKE2b-256 e8affb657446c6ce21d106b5e35dc8ec68c11597e481b041a472c9c26fd69393

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page