{ "info": { "author": "Nico Schl\u00f6mer", "author_email": "nico.schloemer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "# pypathlib\n\n[![CircleCI](https://img.shields.io/circleci/project/github/nschloe/pypathlib/master.svg)](https://circleci.com/gh/nschloe/pypathlib/tree/master)\n[![codecov](https://img.shields.io/codecov/c/github/nschloe/pypathlib.svg)](https://codecov.io/gh/nschloe/pypathlib)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![PyPi Version](https://img.shields.io/pypi/v/pypathlib.svg)](https://pypi.org/project/pypathlib)\n[![GitHub stars](https://img.shields.io/github/stars/nschloe/pypathlib.svg?logo=github&label=Stars)](https://github.com/nschloe/pypathlib)\n\nLightweight package for working with 2D paths/polygons.\n\n```python\nimport pypathlib\n\n# Create path\npath = pypathlib.ClosedPath([[0, 0], [0, 1], [1, 1], [1, 0]])\n\n# Get the squared distance of some points to the path\npath.squared_distance([[0.5, 0.5], [0.1, 2.4]])\n\n# Get the _signed_ squared distance of some points to the path\n# (negative if inside the path)\npath.signed_squared_distance([[0.5, 0.5], [0.1, 2.4]])\n\n# Check if the path contains the points\n# (with a tolerance; set negative if you want to exclude the boundary)\npath.contains_points([[0.5, 0.5], [0.1, 2.4]], tol=1.0e-12)\n```\n\npypathlib is fully vectorized, so it's pretty fast. (Not quite as fast as\n[`mathplotlib.path.contains_points`](https://matplotlib.org/api/path_api.html#matplotlib.path.Path.contains_points)\nthough.)\n\n\n### Relevant publications\n\n * [S.W. Sloan, _A point-in-polygon program_. Adv. Eng. Software, Vol 7, No. 1, pp.\n 45-47, 1985, 10.1016/0141-1195(85)90094-4](https://doi.org/10.1016/0141-1195(85)90094-4).\n\n\n### Installation\n\npypathlib is [available from the Python Package\nIndex](https://pypi.org/project/pypathlib/), so simply type\n```\npip install -U pypathlib\n```\nto install or upgrade.\n\n### Testing\n\nTo run the pypathlib unit tests, check out this repository and type\n```\npytest\n```\n\n### Distribution\n\nTo create a new release\n\n1. bump the `__version__` number,\n\n2. publish to PyPi and GitHub:\n ```\n make publish\n ```\n\n### License\n\npypathlib is published under the [MIT license](https://en.wikipedia.org/wiki/MIT_License).\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/nschloe/pypathlib", "keywords": "", "license": "License :: OSI Approved :: MIT License", "maintainer": "", "maintainer_email": "", "name": "pypathlib", "package_url": "https://pypi.org/project/pypathlib/", "platform": "", "project_url": "https://pypi.org/project/pypathlib/", "project_urls": { "Homepage": "https://github.com/nschloe/pypathlib" }, "release_url": "https://pypi.org/project/pypathlib/0.1.2/", "requires_dist": [ "matplotlib; extra == 'plot'", "numpy", "matplotlib; extra == 'all'" ], "requires_python": "", "summary": "Tools for 2D open and closed paths", "version": "0.1.2" }, "last_serial": 4094276, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "a4efebaf01e1faa1ee78db8812fec2b3", "sha256": "c75b4b66908f147cd53a60ec613c025d73fd0bf0feaea97ad400ba9f5d902de4" }, "downloads": -1, "filename": "pypathlib-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a4efebaf01e1faa1ee78db8812fec2b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5764, "upload_time": "2018-07-23T18:30:50", "url": "https://files.pythonhosted.org/packages/47/6d/e9ec31981bd8bc276ae6b73554d548b5893d8a4793585773b2372f757bf0/pypathlib-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f48ece6b9558441c1da1eb15aea346a", "sha256": "ab000426f76850b7b2d3728668f6d17ab7bcb4031f8724847afa7fcbf20e0395" }, "downloads": -1, "filename": "pypathlib-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9f48ece6b9558441c1da1eb15aea346a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5724, "upload_time": "2018-07-23T18:30:51", "url": "https://files.pythonhosted.org/packages/dc/a5/8ed71810628c463b29b9ca8032eebc8b306a611b234b708b1a71b48c2e7f/pypathlib-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4efebaf01e1faa1ee78db8812fec2b3", "sha256": "c75b4b66908f147cd53a60ec613c025d73fd0bf0feaea97ad400ba9f5d902de4" }, "downloads": -1, "filename": "pypathlib-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a4efebaf01e1faa1ee78db8812fec2b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5764, "upload_time": "2018-07-23T18:30:50", "url": "https://files.pythonhosted.org/packages/47/6d/e9ec31981bd8bc276ae6b73554d548b5893d8a4793585773b2372f757bf0/pypathlib-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f48ece6b9558441c1da1eb15aea346a", "sha256": "ab000426f76850b7b2d3728668f6d17ab7bcb4031f8724847afa7fcbf20e0395" }, "downloads": -1, "filename": "pypathlib-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9f48ece6b9558441c1da1eb15aea346a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5724, "upload_time": "2018-07-23T18:30:51", "url": "https://files.pythonhosted.org/packages/dc/a5/8ed71810628c463b29b9ca8032eebc8b306a611b234b708b1a71b48c2e7f/pypathlib-0.1.2.tar.gz" } ] }