{ "info": { "author": "James W. Kennington", "author_email": "jameswkennington@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# `julialg`\n_Julia-style arrays in Python_\n\nPython library for mimicking Julia LinearAlgebra array indexing style and display formatting.\n\nTest Result: [![CircleCI](https://circleci.com/gh/JWKennington/julialg/tree/master.svg?style=svg)](https://circleci.com/gh/JWKennington/julialg/tree/master)\n\n\n## Motivation and Summary\nJulia's `LinearAlgebra` package has some nice features, some of which are easier to emulate in Python than others. When \ncomparing the results of Python code vs Julia code, it is annoying to have to mentally switch between the 0-indexed nature of \nPython and the 1-indexed nature of Julia. Also, the Julia arrays have a prettier array.\n\nThis package wraps numpy n-dimensional arrays in a new class, `JulArray`, and allows for 1-indexed slicing (more mathematically intuitive) \ninstead of 0-indexed slicing (computer science convention). Also improves the prettiness of the representation of the \narray in a manner similar to Julia's LinearAlgebra package. To be clear, this is a Python package, meant to bring some \nof the elegance of Julia's interface for tensors to the Python setting\n\n\n## Indexing\nThe `JulArray` class wraps a `numpy.ndarray` but overrides the getitem syntax to allow for 1-indexed style instead of\nthe default 0-indexed style. For example:\n```python\n>>> import numpy, julialg\n\n# Create a numpy array\n>>> a = numpy.arange(1, 11).reshape((2, 5))\n\n# Create a JulArray from the numpy array\n>>> j = julialg.JulArray(a)\n\n# Index the numpy array using 0-indexed syntax\n>>> a[0, 0:2]\narray([1, 2])\n\n# Index the JulArray using 1-indexed syntax\n>>> j[1, 1:3].array\narray([1, 2])\n```\n\nNotice in the above sample that the `JulArray` is able to convert both ints and slices from 1-indexed notation to\n0-indexed notation to produce the same underlying numpy array. \n\n## Display\nThe `JulArray` overrides the default representation of the numpy array to be more cleanly formatted (like Julia arrays).\n```python\n>>> julialg.JulArray(numpy.arange(1.0, 11.0).reshape((2, 5)))\n2x5 Array{float64,2}\n 1.0000 6.0000\n 2.0000 7.0000\n 3.0000 8.0000\n 4.0000 9.0000\n 5.0000 10.0000\n```\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": "http://github.com/JWKennington/julialg", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "julialg", "package_url": "https://pypi.org/project/julialg/", "platform": "", "project_url": "https://pypi.org/project/julialg/", "project_urls": { "Homepage": "http://github.com/JWKennington/julialg" }, "release_url": "https://pypi.org/project/julialg/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Julia-style arrays in Python", "version": "0.1.0" }, "last_serial": 5398780, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "62155d4e701952f92822d033dd695d35", "sha256": "72a8733d95b4facb652fd5fe0cce47d40952671b3cc7bc067ec4404ed6738efb" }, "downloads": -1, "filename": "julialg-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "62155d4e701952f92822d033dd695d35", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4604, "upload_time": "2019-06-14T04:19:32", "url": "https://files.pythonhosted.org/packages/ae/c1/86f0a2f94e94e9977ec28803e5c5e4457f8f8adb3e7809796cb2a304dd24/julialg-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03778338c1be84cad1d50b6f86f02e81", "sha256": "75ff8104b307d5702000344175263e347606c396fbc7cf507c03dd6472bda6d1" }, "downloads": -1, "filename": "julialg-0.1.0.tar.gz", "has_sig": false, "md5_digest": "03778338c1be84cad1d50b6f86f02e81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3764, "upload_time": "2019-06-14T04:19:35", "url": "https://files.pythonhosted.org/packages/19/b3/a22b77de91be767f7b28b5e1ad1b3d2a3f1c981eefc1d77399110cd92aa7/julialg-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62155d4e701952f92822d033dd695d35", "sha256": "72a8733d95b4facb652fd5fe0cce47d40952671b3cc7bc067ec4404ed6738efb" }, "downloads": -1, "filename": "julialg-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "62155d4e701952f92822d033dd695d35", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4604, "upload_time": "2019-06-14T04:19:32", "url": "https://files.pythonhosted.org/packages/ae/c1/86f0a2f94e94e9977ec28803e5c5e4457f8f8adb3e7809796cb2a304dd24/julialg-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03778338c1be84cad1d50b6f86f02e81", "sha256": "75ff8104b307d5702000344175263e347606c396fbc7cf507c03dd6472bda6d1" }, "downloads": -1, "filename": "julialg-0.1.0.tar.gz", "has_sig": false, "md5_digest": "03778338c1be84cad1d50b6f86f02e81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3764, "upload_time": "2019-06-14T04:19:35", "url": "https://files.pythonhosted.org/packages/19/b3/a22b77de91be767f7b28b5e1ad1b3d2a3f1c981eefc1d77399110cd92aa7/julialg-0.1.0.tar.gz" } ] }