{ "info": { "author": "Andrew Champion", "author_email": "awchampion@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# Kinda\n\n## About\n\nKinda is a pythonic library for comparing floating point values with\n[Python operator functions](https://docs.python.org/2/library/operator.html#mapping-operators-to-functions).\n\n## Arguments\n\nThe implementation and documentation are identical to\n[math.isclose](https://docs.python.org/3/library/math.html#number-theoretic-and-representation-functions).\n\n## Comparisons\n\n### Equality\n\n```py\n>>> import kinda\n>>> # a == b\n>>> kinda.eq(1.0000, 1.0000)\nTrue\n>>> # a != b (default precision)\n>>> kinda.eq(0.9999, 1.0001)\nFalse\n```\n\n### Precision\n\nAll `math.isclose()` arguments are accepted in all functions.\n\n* `abs_tol`: absolute tolerance (`abs(a - b)`)\n* `rel_tol`: percentage tolerance (1% = .01)\n\n```py\n>>> # reduce absolute precision\n>>> kinda.eq(0.9999, 1.0001, abs_tol=0.0002)\nTrue\n>>> # precision: 1%\n>>> kinda.eq(1.0000, 1.0500, rel_tol=0.01)\nFalse\n>>> # precision: 5%\n>>> kinda.eq(1.0000, 1.0500, rel_tol=0.05)\nTrue\n```\n\n### Inequality\n\n```py\n>>> import kinda\n>>> [kinda.ne(0.9999, 1.0001), kinda.ne(1.0000, 1.0000)]\n[True, False]\n```\n\n### Less/Greater Than\n\n```py\n>>> import kinda\n>>> # [a < b, a > b]\n>>> [kinda.lt(1.0000, 1.0001), kinda.gt(1.0001, 1.0000)]\n[True, True]\n```\n\n### Less/Greater Than or Equal To\n\n```py\n>>> import kinda\n>>> kinda.le(1.0000, 1.0001) and kinda.ge(1.0000, 1.0001)\n[True, False]\n>>> kinda.le(1.0000, 1.0000) and kinda.ge(1.0000, 1.0000)\n[True, True]\n>>> kinda.le(1.0000, 0.9999) and kinda.ge(1.0000, 0.9999)\n[False, True]\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/schmamps/Kinda/", "keywords": "floating point,comparison", "license": "", "maintainer": "", "maintainer_email": "", "name": "kinda", "package_url": "https://pypi.org/project/kinda/", "platform": "", "project_url": "https://pypi.org/project/kinda/", "project_urls": { "Homepage": "https://github.com/schmamps/Kinda/" }, "release_url": "https://pypi.org/project/kinda/0.9.9/", "requires_dist": null, "requires_python": "", "summary": "A pythonic library for floating point number comparison", "version": "0.9.9" }, "last_serial": 4197811, "releases": { "0.9.9": [ { "comment_text": "", "digests": { "md5": "29a733c47dd1299f5cb1236c9223ebe8", "sha256": "9b33cb8d87703cd64e5ec3d12fe2abd5cca570b3afc34c84eb0d9d5525c7ebcd" }, "downloads": -1, "filename": "kinda-0.9.9-py3-none-any.whl", "has_sig": false, "md5_digest": "29a733c47dd1299f5cb1236c9223ebe8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3122, "upload_time": "2018-08-22T21:51:03", "url": "https://files.pythonhosted.org/packages/d0/fe/b1aa1f0970aeade39ceeae0e02eb03d05114901a5eee5dccae7e6d60a7a3/kinda-0.9.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46bca0ccf35f29153338220d73d43e3b", "sha256": "aeb30864e64ab01afb00126cf851fb40bd7cee47e994c2edf79035b72c357fe2" }, "downloads": -1, "filename": "kinda-0.9.9.tar.gz", "has_sig": false, "md5_digest": "46bca0ccf35f29153338220d73d43e3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2656, "upload_time": "2018-08-22T21:51:04", "url": "https://files.pythonhosted.org/packages/11/fe/e4407b9e03e273a79f6b199ea06480f4ff17309dfdba893c41705e097963/kinda-0.9.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "29a733c47dd1299f5cb1236c9223ebe8", "sha256": "9b33cb8d87703cd64e5ec3d12fe2abd5cca570b3afc34c84eb0d9d5525c7ebcd" }, "downloads": -1, "filename": "kinda-0.9.9-py3-none-any.whl", "has_sig": false, "md5_digest": "29a733c47dd1299f5cb1236c9223ebe8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3122, "upload_time": "2018-08-22T21:51:03", "url": "https://files.pythonhosted.org/packages/d0/fe/b1aa1f0970aeade39ceeae0e02eb03d05114901a5eee5dccae7e6d60a7a3/kinda-0.9.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46bca0ccf35f29153338220d73d43e3b", "sha256": "aeb30864e64ab01afb00126cf851fb40bd7cee47e994c2edf79035b72c357fe2" }, "downloads": -1, "filename": "kinda-0.9.9.tar.gz", "has_sig": false, "md5_digest": "46bca0ccf35f29153338220d73d43e3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2656, "upload_time": "2018-08-22T21:51:04", "url": "https://files.pythonhosted.org/packages/11/fe/e4407b9e03e273a79f6b199ea06480f4ff17309dfdba893c41705e097963/kinda-0.9.9.tar.gz" } ] }