{ "info": { "author": "Mohamed Yousif", "author_email": "mmbusif@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "array2latex\n============\n\nIt converts NumPy's arrays into valid LaTeX tables. I use NumPy a lot, and it is always the case that I wanted to convert some array to latex. I wanted something that `imported' in my jupyter notebook such that when I get my results I will directly convert them into LaTeX table (as oppose of converting them into a csv file, and then convert that into LaTeX using other service)\n\nIn my thesis, I used `Tables Generator`_ which is really cool and very awesome. But it is not what I wanted, the step of converting into csv, and then uploading to the website was just not the very best way to do that.\n\nUses\n----\n\nFirst you need to install it via pip using\n\n.. code-block:: python\n\n\tpip install array2latex\n\nOr using Anaconda, both work just fine, and they will always have the same lates version\n\n.. code-block:: python\n\n\tconda install -c adonese array2latex\n\nStarting `array2latex` is very simple. It is meant to be integrated with your workflow e.g., working with numpy array and output the final result into `LaTeX` table\n\n.. code-block:: python\n\n\tfrom array2latex import tolatex\n\timport numpy as np\n\t# Assuming that you have done some cool stuffs with `NumPy`, you have\n\t# you output and want them to be in latex format\n\t# For me I will just use NumPy random array!\n\tarray = np.random.rand(3, 4) # Create 3,4 random matrix\n\ttable = tolatex(array, header=header)\n\t# And thats it! You now have a valid LaTeX table.\n\nBut there are even more to add. `array2latex` only have 2 required argumets, the array you want to convert (obviously), and the header of your table. You can also sepecify a `caption` of you table, and you can also add a `label` as you would normally do in a typical table in LaTeX. To do that is very simple actually, you just need to do\n\n.. code-block:: python\n\n\t# Assuming you have imported all the necessary packages, and done you cool stuffs with numpy\n\tarray = np.random.rand(3, 4) # Create 3,4 random matrix\n\ttable = tolatex(array, header=[\"col1\", \"col2\", \"col3\", \"col4\"], caption=\"My cool table\", label=\"table:cool-table\")\n\nIn the previous examples the output will be the stdout, i.e., your `jupyter notebook` or your terminal. However, we also allow you to store the results in a file. To do that\n\n.. code-block:: python\n\n\t# Assuming you have imported all the necessary packages, and done you cool stuffs with numpy\n\tarray = np.random.rand(3, 4) # Create 3,4 random matrix\n\ttable = tolatex(array, header=[\"col1\", \"col2\", \"col3\", \"col4\"], caption=\"My cool table\", label=\"table:cool-table\", output_file=\"somefile.txt\") # The extenstion of the file doesn't really matter. It's just a txt file anyway.\n\nSo yes this is the whole about `array2latex`.\n\nTODO\n-----\n\n\t- Include Pandas dataframes. I could already done that lazily by detecting the input type and then convert it to numpy and the rest of the code will be unchanged.\n\t- Refactoring the code, etc. It is a must. The code is horrible, yet it works, efficiently? I guess\n\t- Adding comments, using more informative names for variables. I really wish I could found something more informative than string_arry.\n\t- Please, this code is yours, fork it, modify it, pull request, etc. so that we have a better tool to convert NumPy arrays and other arrays into LaTeX tables.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adonese/arraytolatex", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "array2latex", "package_url": "https://pypi.org/project/array2latex/", "platform": "", "project_url": "https://pypi.org/project/array2latex/", "project_urls": { "Homepage": "https://github.com/adonese/arraytolatex" }, "release_url": "https://pypi.org/project/array2latex/0.5/", "requires_dist": null, "requires_python": "", "summary": "A tool to convert array into latex tables", "version": "0.5" }, "last_serial": 2512397, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "eb2d4e54afaf61dfef7233ce83c78c29", "sha256": "b5c4991c4a2dfab47b1c2f79eb928f90dffe6a4330874c8289fe3456663d947a" }, "downloads": -1, "filename": "array2latex-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb2d4e54afaf61dfef7233ce83c78c29", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2995, "upload_time": "2016-12-11T18:33:56", "url": "https://files.pythonhosted.org/packages/57/64/c6b6c0a14002552bc001a551dd8adc553fc87c81906225d505be21026a22/array2latex-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c931301a67d4cb547a0b98590a69aff6", "sha256": "7966148b31bb210af2af3df395b7c4548948b808288b683e0f438ac7a97e9f6c" }, "downloads": -1, "filename": "array2latex-0.2.tar.gz", "has_sig": false, "md5_digest": "c931301a67d4cb547a0b98590a69aff6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1517, "upload_time": "2016-12-11T18:33:58", "url": "https://files.pythonhosted.org/packages/a9/1a/ad06aa47e9ad730c94732e884857701804138db442435b88c989094a3c76/array2latex-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "f43c35ec94e1cdeccd7197bf1fbe7d5e", "sha256": "c314354b9627627120fb0e5deb64f92da761be1ce42fd6395c623a4854f8a3cf" }, "downloads": -1, "filename": "array2latex-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f43c35ec94e1cdeccd7197bf1fbe7d5e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2995, "upload_time": "2016-12-11T19:35:40", "url": "https://files.pythonhosted.org/packages/89/65/bf9d084128cf2c9607aaabc38a15cb173813fa4080ab353a7f641cd61605/array2latex-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "594502b1b88cc8875f740402bb0db110", "sha256": "23aa58e9bc5ad97915c8179206d8fcba68971255a27248be7803055a20d6e625" }, "downloads": -1, "filename": "array2latex-0.3.tar.gz", "has_sig": false, "md5_digest": "594502b1b88cc8875f740402bb0db110", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1515, "upload_time": "2016-12-11T19:35:42", "url": "https://files.pythonhosted.org/packages/1e/e7/7b286cf25e75db8e6b2c60211940f667077912d9c7f1d8f119ff0eca54e5/array2latex-0.3.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "587c76f1cdffb0a420da3b32c1db37f1", "sha256": "360c8e3eee0ccd597397973b0dcbeb69dc3ab9591b748951f8b90f39a9a7fd31" }, "downloads": -1, "filename": "array2latex-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "587c76f1cdffb0a420da3b32c1db37f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4521, "upload_time": "2016-12-11T23:20:43", "url": "https://files.pythonhosted.org/packages/ca/68/da2e8c812f5b05a2bafcb1a907a7f9a8b02358efedd83dca2e48c80e9a22/array2latex-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fc612100b990c488cbc08a85a4092bf", "sha256": "ccb37a29d9ac39624f72b28a42046cfcdb775f5e46fbfa13ce945ab7f289d78d" }, "downloads": -1, "filename": "array2latex-0.5.tar.gz", "has_sig": false, "md5_digest": "0fc612100b990c488cbc08a85a4092bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2387, "upload_time": "2016-12-11T23:20:44", "url": "https://files.pythonhosted.org/packages/e7/9e/3a6bdb25f6e3528a99bc7f552242dbf58add20ac6bb3765057062aebe694/array2latex-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "587c76f1cdffb0a420da3b32c1db37f1", "sha256": "360c8e3eee0ccd597397973b0dcbeb69dc3ab9591b748951f8b90f39a9a7fd31" }, "downloads": -1, "filename": "array2latex-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "587c76f1cdffb0a420da3b32c1db37f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4521, "upload_time": "2016-12-11T23:20:43", "url": "https://files.pythonhosted.org/packages/ca/68/da2e8c812f5b05a2bafcb1a907a7f9a8b02358efedd83dca2e48c80e9a22/array2latex-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fc612100b990c488cbc08a85a4092bf", "sha256": "ccb37a29d9ac39624f72b28a42046cfcdb775f5e46fbfa13ce945ab7f289d78d" }, "downloads": -1, "filename": "array2latex-0.5.tar.gz", "has_sig": false, "md5_digest": "0fc612100b990c488cbc08a85a4092bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2387, "upload_time": "2016-12-11T23:20:44", "url": "https://files.pythonhosted.org/packages/e7/9e/3a6bdb25f6e3528a99bc7f552242dbf58add20ac6bb3765057062aebe694/array2latex-0.5.tar.gz" } ] }