I'm trying to close issue #12157 <https://github.com/sympy/sympy/issues/12157> through the PR #25012 <https://github.com/sympy/sympy/pull/25012>.
In summary, the issue comes from the physics dyadic (sympy/physics/vector/dyadic.py) printing method not properly accounting for expressions with large width such as fractions and powers. However, as it was discussed in the issue, the printing routine for dyadic objects from the vector package (sympy/vector/dyadic.py) correctly handles the formatting. I should note that this routine is very similar to the non-working dedicated one for the physics dyadic I've found two ways of solving the issue. One of them takes a hacky approach to reroute the printing routine for the physics dyadic so it can use the same routine as the vector's dyadic. This prevents copying code across files and is a much smaller change, but it involves writing hacky methods for the physics dyadic class so that the printing routine can work properly. The other way updates the current dedicated printing method present in the physics dyadic class, which itself is very similar to the working printing routine and probably was the basis for it. It's a much longer change and based of off the currently working printing routine for the vector's dyadic. since the physics dyadic and the vector's dyadic have very different implementations from what I've seen, those seem the best options to deal with the issue without completely rewriting the physics vector and physics dyadic classes. But I'm unsure which one is considered "best practices". -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c9cc47fd-5a55-4838-8948-1d9b7289df01n%40googlegroups.com.
