Skip to content

Commit 3a465cf

Browse files
authored
Merge pull request #29 from dbatten5/fix-endrule
Fix endrule
2 parents c9dcd06 + 65b37e2 commit 3a465cf

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "arraytex"
3-
version = "0.0.5"
3+
version = "0.0.6"
44
description = "ArrayTeX"
55
authors = ["Dom Batten <[email protected]>"]
66
license = "MIT"

src/arraytex/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def to_matrix(
2525
2626
Args:
2727
arr: the array to be converted
28-
style: a style formatter string, either "b" for "bmatrix" or "p" for "pmatrix"
28+
style: a style formatter string, such as "b" for "bmatrix" or "p" for "pmatrix"
2929
num_format: a number formatter string, e.g. ".2f"
3030
scientific_notation: a flag to determine whether e.g. 1 x 10^3 format should
3131
be used if ".e" is used for `num_format`, otherwise e-notation (1e3)
@@ -119,7 +119,7 @@ def to_tabular(
119119
rv += [" & ".join(cols) + r" \\"]
120120
rv += [r"\midrule"]
121121
rv += [line.strip() + r" \\" for line in lines]
122-
rv += [r"\endrule"]
122+
rv += [r"\bottomrule"]
123123
rv += [r"\end{tabular}"]
124124

125125
return "\n".join(rv)

tests/test_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_default(self) -> None:
204204
\midrule
205205
1 & 2 & 3 \\
206206
4 & 5 & 6 \\
207-
\endrule
207+
\bottomrule
208208
\end{tabular}"""
209209
)
210210

@@ -222,7 +222,7 @@ def test_given_cols(self) -> None:
222222
\midrule
223223
1 & 2 \\
224224
3 & 4 \\
225-
\endrule
225+
\bottomrule
226226
\end{tabular}"""
227227
)
228228

@@ -240,7 +240,7 @@ def test_given_col_align(self) -> None:
240240
\midrule
241241
1 & 2 \\
242242
3 & 4 \\
243-
\endrule
243+
\bottomrule
244244
\end{tabular}"""
245245
)
246246

@@ -257,7 +257,7 @@ def test_one_dimensional(self) -> None:
257257
Col 1 & Col 2 & Col 3 \\
258258
\midrule
259259
1 & 2 & 3 \\
260-
\endrule
260+
\bottomrule
261261
\end{tabular}"""
262262
)
263263

@@ -274,6 +274,6 @@ def test_0_d(self) -> None:
274274
Col 1 \\
275275
\midrule
276276
1 \\
277-
\endrule
277+
\bottomrule
278278
\end{tabular}"""
279279
)

0 commit comments

Comments
 (0)