{"id":40065368,"url":"https://github.com/adonese/array2latex","last_synced_at":"2026-01-19T07:35:06.165Z","repository":{"id":57411589,"uuid":"76158605","full_name":"adonese/array2latex","owner":"adonese","description":"Easily convert NumPy arrays into LaTeX tables","archived":false,"fork":false,"pushed_at":"2016-12-12T12:32:09.000Z","size":44,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-08T01:43:22.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adonese.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-11T06:37:08.000Z","updated_at":"2023-12-16T21:14:06.000Z","dependencies_parsed_at":"2022-08-27T19:12:02.663Z","dependency_job_id":null,"html_url":"https://github.com/adonese/array2latex","commit_stats":null,"previous_names":["adonese/arraytolatex"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adonese/array2latex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonese%2Farray2latex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonese%2Farray2latex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonese%2Farray2latex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonese%2Farray2latex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adonese","download_url":"https://codeload.github.com/adonese/array2latex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonese%2Farray2latex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-19T07:35:06.113Z","updated_at":"2026-01-19T07:35:06.159Z","avatar_url":"https://github.com/adonese.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"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 \u003chttps://www.tablesgenerator.com\u003e`_ 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\nFor more informations about the development versions of `array2latex` you can go to the `release \u003chttps://github.com/adonese/array2latex/releases\u003e`_ page.\n\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonese%2Farray2latex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadonese%2Farray2latex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonese%2Farray2latex/lists"}