Skip to content

Commit

Permalink
fix quotient
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Nov 11, 2024
1 parent 4ee25b5 commit eff4971
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sympy/printing/pretty/stringpict.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def stack(*args, align="c"):
from top to bottom.
Returns string, baseline arguments for stringPict.
The baseline is the baseline of the second picture.
Everything is centered.
By default, everything is centered. If `align` is set to
'l' ('r') the elements are aligned to the left (right) margin.
Baseline is the baseline of the second picture.
Strings are allowed.
The special value stringPict.LINE is a row of '-' extended to the width.
Expand Down Expand Up @@ -158,6 +159,7 @@ def stack(*args, align="c"):
raise ValueError(
f"the align parameter must be one of 'l'(left), 'r'(right) or 'c' (center). Got {align}."
)

newBaseline = objects[0].height() + objects[1].baseline
return "\n".join(newPicture), newBaseline

Expand Down Expand Up @@ -456,7 +458,7 @@ def __truediv__(self, den, slashed=False):
den = den.parens()

if num.binding == prettyForm.NEG:
num = num.right(' ')[0]
num = num.right(' ')

return prettyForm(
binding=prettyForm.DIV, *stringPict.stack(num, stringPict.LINE, den)
Expand Down

0 comments on commit eff4971

Please sign in to comment.