Skip to content

Commit 5758714

Browse files
committed
update readme
1 parent 4d03255 commit 5758714

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,29 @@
2121
[pre-commit]: https://github.com/pre-commit/pre-commit
2222
[black]: https://github.com/psf/black
2323

24+
Convert a `numpy.NDArray` to various LaTeX forms.
25+
26+
```python
27+
>>> import numpy as np
28+
>>> from arraytex import to_matrix
29+
>>> A = np.array([[1, 2, 3], [4, 5, 6]])
30+
>>> print(to_matrix(A))
31+
\begin{bmatrix}
32+
1 & 2 & 3 \\
33+
4 & 5 & 6 \\
34+
\end{bmatrix}
35+
```
36+
37+
Inspired by @josephcslater's [array_to_latex](https://github.com/josephcslater/array_to_latex).
38+
2439
## Features
2540

26-
- TODO
41+
- Options to use different environment delimiters (`bmatrix` or `pmatrix`) and different
42+
number formatters (`:.2f`, `:.3e`, etc.).
2743

2844
## Requirements
2945

30-
- TODO
46+
- `python >= 3.8`
3147

3248
## Installation
3349

@@ -39,7 +55,7 @@ $ pip install arraytex
3955

4056
## Usage
4157

42-
Please see the [Command-line Reference] for details.
58+
Please see the [docs](https://arraytex.readthedocs.io/) for more information.
4359

4460
## Contributing
4561

src/arraytex/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
"""ArrayTeX."""
2+
3+
from .api import to_matrix

0 commit comments

Comments
 (0)