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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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