Kinda
About
Kinda is a pythonic library for comparing floating point values with Python operator functions.
Arguments
The implementation and documentation are identical to math.isclose.
Comparisons
Equality
>>> import kinda
>>> # a == b
>>> kinda.eq(1.0000, 1.0000)
True
>>> # a != b (default precision)
>>> kinda.eq(0.9999, 1.0001)
False
Precision
All math.isclose() arguments are accepted in all functions.
abs_tol: absolute tolerance (abs(a - b))rel_tol: percentage tolerance (1% = .01)
>>> # reduce absolute precision
>>> kinda.eq(0.9999, 1.0001, abs_tol=0.0002)
True
>>> # precision: 1%
>>> kinda.eq(1.0000, 1.0500, rel_tol=0.01)
False
>>> # precision: 5%
>>> kinda.eq(1.0000, 1.0500, rel_tol=0.05)
True
Inequality
>>> import kinda
>>> [kinda.ne(0.9999, 1.0001), kinda.ne(1.0000, 1.0000)]
[True, False]
Less/Greater Than
>>> import kinda
>>> # [a < b, a > b]
>>> [kinda.lt(1.0000, 1.0001), kinda.gt(1.0001, 1.0000)]
[True, True]
Less/Greater Than or Equal To
>>> import kinda
>>> kinda.le(1.0000, 1.0001) and kinda.ge(1.0000, 1.0001)
[True, False]
>>> kinda.le(1.0000, 1.0000) and kinda.ge(1.0000, 1.0000)
[True, True]
>>> kinda.le(1.0000, 0.9999) and kinda.ge(1.0000, 0.9999)
[False, True]
Metadata
Release files for kinda 0.9.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kinda-0.9.9.tar.gz | 2.7 kB | Without provenance | Details for kinda-0.9.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kinda-0.9.9-py3-none-any.whl | Python 3 | none | any | Details for kinda-0.9.9-py3-none-any.whl |
Total release size: 5.8 kB
Release files / kinda-0.9.9.tar.gz
| Download URL | kinda-0.9.9.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aeb30864e64ab01afb00126cf851fb40bd7cee47e994c2edf79035b72c357fe2
|
|
BLAKE2b-256 checksum How to use checksums |
11fee4407b9e03e273a79f6b199ea06480f4ff17309dfdba893c41705e097963
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / kinda-0.9.9-py3-none-any.whl
| Download URL | kinda-0.9.9-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b33cb8d87703cd64e5ec3d12fe2abd5cca570b3afc34c84eb0d9d5525c7ebcd
|
|
BLAKE2b-256 checksum How to use checksums |
d0feb1aa1f0970aeade39ceeae0e02eb03d05114901a5eee5dccae7e6d60a7a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Security for kinda 0.9.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.