Skip to content

Commit

Permalink
adjuts comments on root
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Nov 13, 2024
1 parent 7a52154 commit 75daec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sympy/printing/pretty/stringpict.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,16 @@ def root(self, n=None):
|---| + a
\\ y /
"""
# TODO: use it in root drawing in PrettyPrinter.
#
# put line over expression
# Decide if using a square root symbol or
# an base - exponent form:
if n is not None:
if isinstance(n, str):
n = stringPict(n)
if n.height() > 1:
exponent = n.parens().left(stringPict("1 / "))
return self ** exponent

# put line over expression
result = self.above(hobj('_', 2 + self.width()))
#construct right half of root symbol
height = self.height()
Expand Down

0 comments on commit 75daec5

Please sign in to comment.