pprint: prettify matrix output (#495)
commit13d91b552525b7aa483f9a2864d8a001179775be
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 26 Jul 2008 12:44:32 +0000 (26 16:44 +0400)
committerKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 26 Jul 2008 12:44:32 +0000 (26 16:44 +0400)
tree8ae4e1573805c8485d0ed677b74fe3c90cc50c01
parentc956539b40f13a92072ac0838cc04cf800db7599
pprint: prettify matrix output  (#495)

compare old and new look and feel for

In [1]: Matrix([[x*sin(x)/y, 1], [1, 0]])

(old)
⎡                 ⎤
⎢x⋅sin(x)         ⎥
⎢────────        1⎥
⎢   y             ⎥
⎢                 ⎥
⎢                 ⎥
⎣       1        0⎦

(new)
⎡x⋅sin(x)   ⎤
⎢────────  1⎥
⎢   y       ⎥
⎢           ⎥
⎣   1      0⎦

Now, we don't uniformly reshape each cell to maxw/maxh, but do this
column-wise.

Also, cells are now h-centered.

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
sympy/printing/pretty/pretty.py
sympy/printing/pretty/tests/test_pretty.py
sympy/printing/pretty/tests/test_pretty_unicode.py