ArrayTeX
Convert a numpy.NDArray to various LaTeX forms.
>>> import numpy as np
>>> import arraytex as atx
>>> A = np.array([[1, 2, 3], [4, 5, 6]])
>>> print(atx.to_matrix(A))
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{bmatrix}
>>> print(atx.to_tabular(A))
\begin{tabular}{c c c}
\toprule
Col 1 & Col 2 & Col 3 \\
\midrule
1 & 2 & 3 \\
4 & 5 & 6 \\
\bottomrule
\end{tabular}
Inspired by @josephcslater's array_to_latex.
Features
- Support for matrix environments with different delimiters (
bmatrix,pmatrix, etc.). - Support for tabular environments.
- Support for builtin number formats (
:.2f,:.3e, etc.). - Fully tested and typed.
Requirements
python >= 3.8
Installation
You can install ArrayTeX via pip from PyPI:
$ pip install arraytex
Usage
Please see the docs for more information.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, ArrayTeX is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.
Metadata
Release files for arraytex 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arraytex-0.0.9.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arraytex-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / arraytex-0.0.9.tar.gz
| Download URL | arraytex-0.0.9.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d342c0b86afb7c194a55dbde4e999aedf3430db0855e6b14c976c752ff351dba
|
|
BLAKE2b-256 checksum How to use checksums |
401056dd8a8bd7ef962d935281f740c9ddbbdcac6a96cb3ea96d66bb242b5db4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / arraytex-0.0.9-py3-none-any.whl
| Download URL | arraytex-0.0.9-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6d5ec3a1d08cf44ab2abe09ef9cc644efb95f3a44a37c3c4f3497c64965acff
|
|
BLAKE2b-256 checksum How to use checksums |
36f5db755418bb71fbcb589639f360caaa345670bb2b8cfca1602d0877749694
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|