einsteinpy
einsteinpy copied to clipboard
the terms of the Ricci Tensor are tangled
Hi everyone, when i print the ricci tensor in pyhton (with sympy and einteinpy) the results are tangled
how can I resolve this ?
I really don't understand how I should read this
If I can have some help please
in this picture, this is for the Ricci scalar
Hey @AfnanAlsaati , can you share some code snippet which can help me understand the problem well?
Hi @shreyasbapat,
Yes of course,
I finally do my work on Notebook. I dont know why but in Python I can't display well the tensor like I said before
Thanks @AfnanAlsaati . I will get back to you in a day or two on this.
Also, would be great if the code snippet can be placed in a Github Gist or something like that. Because it helps understand the problem better.
Hi @shreyasbapat , Ok ! Tank you
This is my display of the tensor on Jupyter(notebook) work well. It is only in python my problem. I don't know why it don't work. Do you want that a copy and paste my python code ?
Hey @AfnanAlsaati, thanks for opening this issue. Since the elements in the matrix are quite long, they are getting split into multiple lines. So, the terminal window is unable to fit the whole matrix, leading to symbols being tangled. Another issue is that Sympy usually cannot generate latex output in the terminal, because many terminals do not support the full Unicode character set (UTF-8) out-of-the-box. The most elegant solution is to use Jupyter notebook, either in a browser like you are doing, or in a code editor like Visual Studio Code.
That said, if you have to use python in the terminal, ensure that UTF-8 support is enabled and that you are using a terminal font that also supports UTF-8. The exact way to do this depends on your terminal.
I am closing this issue as resolved. Feel free to comment here, if you have any further questions.