-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Having an option to truncate large array printing. #16251
Labels
Comments
Should the width (number of columns) of the trimmed matrix be hard-coded ?? similarly for the height |
mohamedrezk122
added a commit
to mohamedrezk122/sympy
that referenced
this issue
Feb 27, 2024
…ting The `_print_matrix_contents` method now includes options for compactifying and setting maximum visible rows and columns, providing a more readable representation. This improvement prevents printing slowdowns for large matrices and improves overall user experience. This modification shall solve sympy#16251.
In SymPy, it may be a bit more challenging to implement this because SymPy expressions, itself typically, have many varying sizes, and small matrix with big expressions, can also get to issues of stuck of printing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the Jupter workflow, often, such printing causes great slowdown, and even crashes.
However, for the latex representations, there is a natural way to express such large arrays in more compact form, like below.
And I believe that sympy's latex printer can do some work in the middle, to automatically trim some large arrays in printing, unless the user specifies it to print its full form.
For example, Mathematica automatically does some alternative representation for objects, that are expected to be slow to print.
Even though, Mathematica notebook's IO is different from Jupyter.
The text was updated successfully, but these errors were encountered: