{ "info": { "author": "Tom Egan", "author_email": "tkegan@greenneondesign.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# About\n*ndvector* is yet another vector math library for Python3. Where numpy focuses\non everything including the kitchen sink, ndvector is intended to provide a\nsimple, pythonic, object oriented API for vector math in n dimensions.\n\n# License\nApache License 2.0 (see LICENSE)\n\n# Requirements\npython >= 3.5\n\n# Usage\nUsage attempts to be about what you expect. Simply import the library, create\nPoint and Vector objects, and do math with them.\n\n```python\nfrom n_dimension import Vector\n\nv1 = Vector(1.0, 0.0)\nv2 = Vector(-1.0, 1.0)\nv3 = v1 + v2\nprint(v3) # => Vector \u20390.0, 1.0\u203a\n```\n\n# API\nGiven:\n\n\t- s a scalar (float)\n\n\t- p, p# are instances of Point\n\n\t- v, v# are instances of Vector\n\nClass `Point`:\n\n\t- constructor - create a Point from one or more float parameters, a tuple\n\t\tof floats, or a list of floats\n\n\t- properties:\n\n\t\t- dimension - the dimension of the Point\n\n\t- operators:\n\n\t\t- 'p + v' addition of a Vector to a Point to get the Point at the tip of\n\t\t\tthe Vector if the tail of the vector is moved to the Point\n\n\t\t- 'p1 - p2' subtraction of a Point from a Point to get the Vector between\n\t\t\tthe Points\n\n\t\t- 'p1 == p2' equality (See Note 1)\n\n\t\t- 'p1 != p2' not equality (See Note 1)\n\nClass `Vector`:\n\n\t- constructor - create a Vector from one or more float parameters, a tuple\n\t\tof floats, or a list of floats\n\n\t- properties:\n\t\t- dimension - the dimension of the vector\n\t\t- magnitude - the magnitude of the vector\n\n\t- operators\n\n\t\t- 'v1 + v2' vector addition\n\n\t\t- 'v1 - v2' vector subtraction\n\n\t\t- 'v1 * v2' scalar aka dot product (v1 * v2 => scalar)\n\n\t\t- 'v * s' scale vector\n\n\t\t- 'v1 @ v2' vector aka cross product (v1 * v2 => vector) (See Note 2)\n\n\t\t- 'v1 == v2' equality (See Note 1)\n\n\t\t- 'v1 != v2' not equality (See Note 1)\n\n\t- methods\n\n\t\t- angle() - find the angle in radians between the vector and another vector\n\n\t\t- normalize() - find a unit vector with the same direction as the vector\n\n## Notes\n1) testing for equality when floats are involved is tricky. n_dimension\n\tconsiders two floats to be equal if the absolute value of their difference\n\tis less than a certain amount; currently 0.000001 seems to work well. This\n\tmay be refined after more testing\n2) only implemented for Vectors of dimension three (3)\n\n# Testing\nTesting is done using `tox` and `pytest`. See\nhttps://tox.readthedocs.io/en/latest/ for information about installing tox.\nRun the tests by cloning the source repository, changing into the local\nworking directory, and invoking `tox`.\n\n```sh\ngit clone https://github.com/tkegan/n_dimension.git\ncd n_dimension\ntox\n```\n\n# To Do\n- Create better API documentation\n\n- Investigate accelerated performance by moving some functionality to compiled code but only if the pure python implementation can be kept as a fallback\n\n# Contribute\nI welcome pull requests against the GitHub repository. If extending the API, please include tests. I will not merge changes to the API until tests are in place and passing.\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/tkegan/ndvector", "keywords": "vector,math,linear algebra", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "ndvector", "package_url": "https://pypi.org/project/ndvector/", "platform": "", "project_url": "https://pypi.org/project/ndvector/", "project_urls": { "Homepage": "https://github.com/tkegan/ndvector" }, "release_url": "https://pypi.org/project/ndvector/1.1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "A library for vector math in n dimensions.", "version": "1.1.0" }, "last_serial": 5875555, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ae7af05ec2488c327a692a0ce99e4df3", "sha256": "734015cfc5b8c8917c351f32b7444ffc66e2e81cbf88e3389bf9d704935c680b" }, "downloads": -1, "filename": "ndvector-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "ae7af05ec2488c327a692a0ce99e4df3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.5", "size": 9466, "upload_time": "2019-08-08T21:29:24", "url": "https://files.pythonhosted.org/packages/ea/08/93bf7ccf6f89035b70b8328ae8599650f35ea20778da1bbf7adde93e61b7/ndvector-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1bf761e8c266ef6bff9b920a525f70b9", "sha256": "90edbf5413051788059f69def01cec0c9bfe4f71ce4d9a76d7cd42e8cbe5c302" }, "downloads": -1, "filename": "ndvector-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1bf761e8c266ef6bff9b920a525f70b9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4415, "upload_time": "2019-08-08T21:29:26", "url": "https://files.pythonhosted.org/packages/4a/ad/359888a81c13ea9076f8e46c6ee09f588110c173a0dcf1f4d16e3e5b055a/ndvector-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e3f8063e89f3f13d2ebaa69467e2738d", "sha256": "ce893f2cfc45b57b1591911cc2dcce89e9a9b5af57c790ccfd65d2f83f25db9d" }, "downloads": -1, "filename": "ndvector-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e3f8063e89f3f13d2ebaa69467e2738d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 9496, "upload_time": "2019-09-23T19:03:23", "url": "https://files.pythonhosted.org/packages/e8/80/fed8d650556918899c20705fe88231580427e02c24deef375dcbeadabdb3/ndvector-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53fb40902afd574dbd895819d90833b2", "sha256": "c474181967349080923bb035c600a687abdb072cdf6d32413d0d6e474e76c3e1" }, "downloads": -1, "filename": "ndvector-1.1.0.tar.gz", "has_sig": false, "md5_digest": "53fb40902afd574dbd895819d90833b2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4407, "upload_time": "2019-09-23T19:03:26", "url": "https://files.pythonhosted.org/packages/17/6f/c67c7863a96afa30eb37137b360090e58bf6b8efa451f258f9ea2f8b35d7/ndvector-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3f8063e89f3f13d2ebaa69467e2738d", "sha256": "ce893f2cfc45b57b1591911cc2dcce89e9a9b5af57c790ccfd65d2f83f25db9d" }, "downloads": -1, "filename": "ndvector-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e3f8063e89f3f13d2ebaa69467e2738d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 9496, "upload_time": "2019-09-23T19:03:23", "url": "https://files.pythonhosted.org/packages/e8/80/fed8d650556918899c20705fe88231580427e02c24deef375dcbeadabdb3/ndvector-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53fb40902afd574dbd895819d90833b2", "sha256": "c474181967349080923bb035c600a687abdb072cdf6d32413d0d6e474e76c3e1" }, "downloads": -1, "filename": "ndvector-1.1.0.tar.gz", "has_sig": false, "md5_digest": "53fb40902afd574dbd895819d90833b2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4407, "upload_time": "2019-09-23T19:03:26", "url": "https://files.pythonhosted.org/packages/17/6f/c67c7863a96afa30eb37137b360090e58bf6b8efa451f258f9ea2f8b35d7/ndvector-1.1.0.tar.gz" } ] }