Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex(Array, mat_str="array") emits bad latex #19381

Open
eric-wieser opened this issue May 20, 2020 · 0 comments · May be fixed by #22231
Open

latex(Array, mat_str="array") emits bad latex #19381

eric-wieser opened this issue May 20, 2020 · 0 comments · May be fixed by #22231

Comments

@eric-wieser
Copy link
Member

eric-wieser commented May 20, 2020

There is a bug in sympy.printing.latex.LatexPrinter._print_NDimArray:

print(sympy.latex(sympy.Array([[[1]]]), mat_str='array'))

gives

\left[\begin{array}\left[\left[\begin{array}1\end{array}\right]\right]\end{array}\right]

This should be

\left[\begin{array}{c}\left[\left[\begin{array}1\end{array}\right]\right]\end{array}\right]

Otherwise the 1 is swallowed as an argument to the align environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants