{ "info": { "author": "Andrew Hynes", "author_email": "andrewjhynes@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering" ], "description": "\n.. figure:: images/logo.svg\n :align: left\n :width: 70%\n\n.. image:: https://img.shields.io/pypi/v/scikit-spatial.svg\n :target: https://pypi.python.org/pypi/scikit-spatial\n\n.. image:: https://img.shields.io/pypi/pyversions/scikit-spatial.svg\n :target: https://pypi.python.org/pypi/scikit-spatial\n\n.. image:: https://img.shields.io/travis/ajhynes7/scikit-spatial.svg\n :target: https://travis-ci.org/ajhynes7/scikit-spatial\n\n.. image:: https://readthedocs.org/projects/scikit-spatial/badge/?version=latest\n :target: https://scikit-spatial.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/ajhynes7/scikit-spatial/shield.svg\n :target: https://pyup.io/account/repos/github/ajhynes7/scikit-spatial/\n\n.. image:: https://codecov.io/gh/ajhynes7/scikit-spatial/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/ajhynes7/scikit-spatial\n\n| \n\nIntroduction\n------------\n\nThis package provides spatial objects based on NumPy arrays, as well as computations using these objects. The package includes computations for 2D, 3D, and higher-dimensional space.\n\nThe following spatial objects are provided:\n\n - Point\n - Points\n - Vector\n - Line\n - Plane\n - Circle\n - Sphere\n\nThe computations can be grouped into the following main categories:\n\n - Measurement\n - Comparison\n - Projection\n - Intersection\n - Fitting\n - Transformation\n\nAll spatial objects are equipped with plotting methods based on ``matplotlib``. Both 2D and 3D plotting are supported. Spatial computations can be easily visualized by plotting multiple objects at once.\n\n\nWhy this instead of ``scipy.spatial`` or ``sympy.geometry``?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis package has little to no overlap with the functionality of ``scipy.spatial``. It can be viewed as an object-oriented extension.\n\nWhile similar spatial objects and computations exist in the ``sympy.geometry`` module, ``scikit-spatial`` is based on NumPy rather than symbolic math. The primary objects of ``scikit-spatial`` (``Point``, ``Points``, and ``Vector``) are actually subclasses of the NumPy *ndarray*. This gives them all the regular functionality of the *ndarray*, plus additional methods from this package.\n\n>>> from skspatial.objects import Vector\n\n>>> vector = Vector([2, 0, 0])\n\nBehaviour inherited from NumPy:\n\n>>> vector.size\n3\n>>> vector.mean().round(3)\n0.667\n\nAdditional methods from ``scikit-spatial``:\n\n>>> vector.norm()\n2.0\n>>> vector.unit()\nVector([1., 0., 0.])\n\n``Point`` and ``Vector`` are based on a 1D NumPy array, and ``Points`` is based on a 2D NumPy array, where each row represents a point in space. The ``Line`` and ``Plane`` objects have ``Point`` and ``Vector`` objects as attributes. \n\nBecause the computations of ``scikit-spatial`` are also based on NumPy, keyword arguments can be passed to NumPy functions. For example, a tolerance can be specified while testing for collinearity. The ``tol`` keyword is passed to ``numpy.linalg.matrix_rank``.\n\n>>> from skspatial.objects import Points\n\n>>> points = Points([[1, 2, 3], [4, 5, 6], [7, 8, 8]])\n\n>>> points.are_collinear()\nFalse\n>>> points.are_collinear(tol=1)\nTrue\n\n\n\nInstallation\n------------\n\nThe package can be installed via pip.\n\n.. code-block:: bash\n\n $ pip install scikit-spatial\n\n\n\nExample Usage\n-------------\n\nMeasurement\n~~~~~~~~~~~\n\nMeasure the cosine similarity between two vectors.\n\n>>> from skspatial.objects import Vector\n\n>>> Vector([1, 0]).cosine_similarity([1, 1]).round(3)\n0.707\n\n\nComparison\n~~~~~~~~~~\n\nCheck if multiple points are collinear.\n\n>>> from skspatial.objects import Points\n\n>>> points = Points([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])\n\n>>> points.are_collinear()\nTrue\n\n\nProjection\n~~~~~~~~~~\n\nProject a point onto a line.\n\n>>> from skspatial.objects import Line\n\n>>> line = Line(point=[0, 0, 0], direction=[1, 1, 0])\n\n>>> line.project_point([5, 6, 7])\nPoint([5.5, 5.5, 0. ])\n\n\nAn error is raised if the computation is undefined.\n\n>>> line_a = Line([0, 0], [1, 0])\n>>> line_b = Line([1, 0], [1, 0])\n\n>>> line_a.intersect_line(line_b)\nTraceback (most recent call last):\n...\nValueError: The lines must not be parallel.\n\n\nIntersection\n~~~~~~~~~~~~\n\nFind the intersection of two planes.\n\n>>> from skspatial.objects import Plane\n\n>>> plane_a = Plane([0, 0, 0], [0, 0, 1])\n>>> plane_b = Plane([5, 16, -94], [1, 0, 0])\n\n>>> plane_a.intersect_plane(plane_b)\nLine(point=Point([5., 0., 0.]), direction=Vector([0, 1, 0]))\n\n\nFitting\n~~~~~~~\n\nFind the plane of best fit for multiple points.\n\n>>> points = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [1, 1, 0]]\n\n>>> Plane.best_fit(points)\nPlane(point=Point([0.5, 0.5, 0. ]), normal=Vector([0., 0., 1.]))\n\n\nTransformation\n~~~~~~~~~~~~~~\n\nTransform multiple points to 1D coordinates along a line.\n\n>>> line = Line(point=[0, 0, 0], direction=[1, 2, 0])\n>>> points = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n\n>>> line.transform_points(points).round(3)\narray([ 2.236, 6.261, 10.286])\n\n\nAcknowledgment\n--------------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ajhynes7/scikit-spatial", "keywords": "scikit-spatial", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "scikit-spatial", "package_url": "https://pypi.org/project/scikit-spatial/", "platform": "", "project_url": "https://pypi.org/project/scikit-spatial/", "project_urls": { "Homepage": "https://github.com/ajhynes7/scikit-spatial" }, "release_url": "https://pypi.org/project/scikit-spatial/2.0.1/", "requires_dist": [ "matplotlib", "numpy" ], "requires_python": "", "summary": "Spatial objects and computations based on NumPy arrays.", "version": "2.0.1" }, "last_serial": 5682028, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "69012e7f07d36e5d9bba510c5990758e", "sha256": "123af5a54ec7219ec4f9095722c9ffd6049c846f56333f408e235bb7682fb978" }, "downloads": -1, "filename": "scikit_spatial-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "69012e7f07d36e5d9bba510c5990758e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25595, "upload_time": "2019-03-05T15:38:53", "url": "https://files.pythonhosted.org/packages/90/9f/3e4e041f959ae2d7b157d6be66be339b780bc23d3a270ed5e1cde7605683/scikit_spatial-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d1d3d3d43b2db6014a2b47de862ded4", "sha256": "b313aa681203d3c1dffd75392e0b7952398273747e8118347e5bec32c8f575e0" }, "downloads": -1, "filename": "scikit-spatial-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5d1d3d3d43b2db6014a2b47de862ded4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27992, "upload_time": "2019-03-05T15:38:56", "url": "https://files.pythonhosted.org/packages/83/52/2eaa371a7536e7653f4edf2bcd81a21a98ea122a1ed4fcea6ac18395b340/scikit-spatial-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "6dc510399a7a335540fe358c220e315d", "sha256": "c5f46ad7a031f3954e1dacba0c9ac7e27a8946eca0e7e3661cf2e2a8d82605c6" }, "downloads": -1, "filename": "scikit_spatial-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6dc510399a7a335540fe358c220e315d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19193, "upload_time": "2019-03-26T20:03:03", "url": "https://files.pythonhosted.org/packages/34/f2/ef265fc8e3a16f4230a629d530fbd750faff510a06469d5917213da55bce/scikit_spatial-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ec87a97ab5a28ce68dc6e7c571d3ed4", "sha256": "205fa846d903d63d61643c2bed70d7fcc8cdc9b168f6d79b5ef510d9fb313591" }, "downloads": -1, "filename": "scikit-spatial-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0ec87a97ab5a28ce68dc6e7c571d3ed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30787, "upload_time": "2019-03-26T20:03:05", "url": "https://files.pythonhosted.org/packages/d2/69/ed121baffd8c5214300c795af647db280f5a4d9c48c51928c94fa703fdb4/scikit-spatial-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "3d0ed76fe77b39920bd2937dfd0d6c62", "sha256": "7950be9145d3e4f1121ec5288ae2e387c66024fa81f79461bb8056d8da48ff94" }, "downloads": -1, "filename": "scikit_spatial-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3d0ed76fe77b39920bd2937dfd0d6c62", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19780, "upload_time": "2019-03-29T20:44:03", "url": "https://files.pythonhosted.org/packages/be/e6/781a4393afe82dd5144c80b5b6017b0151222f6c517d49369ee0c99ed946/scikit_spatial-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6683cb1094cb847d853e3cf0f8bd12a1", "sha256": "71d78fe5adf63325d29bd80f57a1b616ebf07a8636c6659212027f1c5d1896e5" }, "downloads": -1, "filename": "scikit-spatial-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6683cb1094cb847d853e3cf0f8bd12a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32844, "upload_time": "2019-03-29T20:44:04", "url": "https://files.pythonhosted.org/packages/ac/70/f931f6c4b63d6f390a971dcd478954a33f3dd48e30b01666f76c44ea0635/scikit-spatial-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "294f9a791f48d3fd883fe8c443b7509c", "sha256": "2e53b2f2e30b2571aebcbacecb90542a75b260342413cb838515346169ea3b01" }, "downloads": -1, "filename": "scikit_spatial-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "294f9a791f48d3fd883fe8c443b7509c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23234, "upload_time": "2019-05-04T21:41:44", "url": "https://files.pythonhosted.org/packages/42/dc/03eec533850fd1d618557182e9f2df13f0a15ec9d574bf0478b9b55f74e4/scikit_spatial-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8361d05cd94da6c6e7986beb3f6f0012", "sha256": "84b6717fcecd5c8b2ad441e8d116162d55e0cae93d3ff5d85948d4862358da15" }, "downloads": -1, "filename": "scikit-spatial-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8361d05cd94da6c6e7986beb3f6f0012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40410, "upload_time": "2019-05-04T21:41:46", "url": "https://files.pythonhosted.org/packages/c1/7b/887058934de013253281eea221a73b496bb4d1aad25252a509a11ff3674d/scikit-spatial-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "4097a4daeddaeb915f4d6431ca92e555", "sha256": "2c6115e2925028d99381d529b834f720c8d0230c4e0b3184570cab174ff78f17" }, "downloads": -1, "filename": "scikit_spatial-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4097a4daeddaeb915f4d6431ca92e555", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42683, "upload_time": "2019-06-11T16:23:43", "url": "https://files.pythonhosted.org/packages/43/10/40367cfdd27f7dcef6a9ff11f72213c3b8de867bf6bc3124c3ae2804a9d6/scikit_spatial-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d91ca5233cedc6ef7e7cc4e825d7e290", "sha256": "9ed29eb9cb88ec111cdc81d923d8c75256401b4d248933a46d84bf6c6a737d3f" }, "downloads": -1, "filename": "scikit-spatial-1.2.0.tar.gz", "has_sig": false, "md5_digest": "d91ca5233cedc6ef7e7cc4e825d7e290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40661, "upload_time": "2019-06-11T16:23:45", "url": "https://files.pythonhosted.org/packages/01/ac/92305c15c7abe669e9b72713fc4a671f818afb41e6b01368bd5648b55ea2/scikit-spatial-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "773627050360eb1204f828282eb60343", "sha256": "b22be4b18ceb76914849cad34a07b55b5b4e82257b24f1b992bce15c9816311a" }, "downloads": -1, "filename": "scikit_spatial-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "773627050360eb1204f828282eb60343", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42142, "upload_time": "2019-06-19T16:47:02", "url": "https://files.pythonhosted.org/packages/81/7e/7caea8ffe9f2ae12531e17011815f26ddb77fa65b42f2ba7e1efc8768e86/scikit_spatial-1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "777e731608b013ec2d0dc70fdf336daa", "sha256": "6e605db0fb6813ef44cba6352ace78e822ad302033b39fa625d0adf6cca54fc4" }, "downloads": -1, "filename": "scikit-spatial-1.3.0.tar.gz", "has_sig": false, "md5_digest": "777e731608b013ec2d0dc70fdf336daa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40384, "upload_time": "2019-06-19T16:47:04", "url": "https://files.pythonhosted.org/packages/27/8a/b3530d01ef025413c42e0a95935659dacdfc0a01e1d770901f3d240fa109/scikit-spatial-1.3.0.tar.gz" } ], "1.4.2": [ { "comment_text": "", "digests": { "md5": "b7296ec9c7087031d192188a60139b7a", "sha256": "ba600c7377bc0b302bc2ce8b5a1df8198892331edb6b6aa1327dff6d00ae2533" }, "downloads": -1, "filename": "scikit_spatial-1.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b7296ec9c7087031d192188a60139b7a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 43551, "upload_time": "2019-06-21T21:26:21", "url": "https://files.pythonhosted.org/packages/31/b6/1218d82dc5ed013f39c701aa052c016b5ba0eb466ba5c6bb3305c5b30f4a/scikit_spatial-1.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a79ce330995c8254a5348f774340ec8a", "sha256": "4962d1e30966eb1bb62e4b612a3b3532b3f4fa50de2a46634133ac99c3c85e7f" }, "downloads": -1, "filename": "scikit-spatial-1.4.2.tar.gz", "has_sig": false, "md5_digest": "a79ce330995c8254a5348f774340ec8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40980, "upload_time": "2019-06-21T21:26:22", "url": "https://files.pythonhosted.org/packages/32/09/00ed59d6399f1c0c990c71cf319a6996973b8a09945868f6da506d00c9ef/scikit-spatial-1.4.2.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "112a792f1a7559b8712cb2a75f87bd26", "sha256": "bf6af19b15401bc27be4081668520e9e226a0bbf92edff2594568f345658fa79" }, "downloads": -1, "filename": "scikit_spatial-1.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "112a792f1a7559b8712cb2a75f87bd26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50523, "upload_time": "2019-07-05T12:59:08", "url": "https://files.pythonhosted.org/packages/e2/b9/54cfaa885d7fee9f7ffdffdf5781381d57191579e07baddd1f77f6331fa0/scikit_spatial-1.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91c75b7f684df7e2050c8b8589bc3800", "sha256": "c0d6835ea7bf5eeb05db7eb877376067a193afdd691c7ef99948ccd1403ccc4d" }, "downloads": -1, "filename": "scikit-spatial-1.5.0.tar.gz", "has_sig": false, "md5_digest": "91c75b7f684df7e2050c8b8589bc3800", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46240, "upload_time": "2019-07-05T12:59:10", "url": "https://files.pythonhosted.org/packages/c7/33/5d2070946cb94bd76ea992ee924c67347159c454b81f9efd18132d49b3bf/scikit-spatial-1.5.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "2d000c0fbfffe6cb51deaf9290f894b0", "sha256": "27ecdf8f3e1fa7046761245c4086371be5ccf2a7a5b50945fe125210b9f1bcb8" }, "downloads": -1, "filename": "scikit_spatial-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2d000c0fbfffe6cb51deaf9290f894b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 56741, "upload_time": "2019-07-20T21:28:15", "url": "https://files.pythonhosted.org/packages/fe/33/99d7a3b1fd4f80e8694576d70361d461b736a5e87e8e402a99792a99fc80/scikit_spatial-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87fc371ad8f22da5d718db8af2d36881", "sha256": "005e10f319aa5369e8d99d0da49081f053a2262281ec4e08a68cada808a92abc" }, "downloads": -1, "filename": "scikit-spatial-2.0.0.tar.gz", "has_sig": false, "md5_digest": "87fc371ad8f22da5d718db8af2d36881", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49666, "upload_time": "2019-07-20T21:28:17", "url": "https://files.pythonhosted.org/packages/47/f7/f263ba1bc86577f4d9455a5c7df52921a0b3b4d829661b1b3ef515992af1/scikit-spatial-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "08c7a79a806300ce861ea4e569222955", "sha256": "49f0fc73326e7b0d2b1a6918895975857eca87b5c7a5885ebc4518b3ba792ee0" }, "downloads": -1, "filename": "scikit_spatial-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "08c7a79a806300ce861ea4e569222955", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 57065, "upload_time": "2019-08-15T12:36:18", "url": "https://files.pythonhosted.org/packages/5d/2c/cdf69673ab13c05e6cb9098f21cc9a5d1d4b1e36216bc6d44f7eb55de141/scikit_spatial-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e130c43bf068b49a6ab22bc1758e43d", "sha256": "0168b25dba234ea9fb0cc78cf77079b3c5eae403d5dfb30e7b491e85d87f05af" }, "downloads": -1, "filename": "scikit-spatial-2.0.1.tar.gz", "has_sig": false, "md5_digest": "3e130c43bf068b49a6ab22bc1758e43d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51997, "upload_time": "2019-08-15T12:36:20", "url": "https://files.pythonhosted.org/packages/41/6d/4933d591c4df5642a46cda93bee767dcc733ee52b0033ac8e8a4844902ff/scikit-spatial-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08c7a79a806300ce861ea4e569222955", "sha256": "49f0fc73326e7b0d2b1a6918895975857eca87b5c7a5885ebc4518b3ba792ee0" }, "downloads": -1, "filename": "scikit_spatial-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "08c7a79a806300ce861ea4e569222955", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 57065, "upload_time": "2019-08-15T12:36:18", "url": "https://files.pythonhosted.org/packages/5d/2c/cdf69673ab13c05e6cb9098f21cc9a5d1d4b1e36216bc6d44f7eb55de141/scikit_spatial-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e130c43bf068b49a6ab22bc1758e43d", "sha256": "0168b25dba234ea9fb0cc78cf77079b3c5eae403d5dfb30e7b491e85d87f05af" }, "downloads": -1, "filename": "scikit-spatial-2.0.1.tar.gz", "has_sig": false, "md5_digest": "3e130c43bf068b49a6ab22bc1758e43d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51997, "upload_time": "2019-08-15T12:36:20", "url": "https://files.pythonhosted.org/packages/41/6d/4933d591c4df5642a46cda93bee767dcc733ee52b0033ac8e8a4844902ff/scikit-spatial-2.0.1.tar.gz" } ] }