@@ -1238,7 +1238,7 @@ class Sign(SympyFunction):
12381238 = Sign[20]
12391239 """
12401240
1241- sympy_name = ' sign'
1241+ sympy_name = " sign"
12421242 # mpmath_name = 'sign'
12431243
12441244 attributes = ("Listable" , "NumericFunction" )
@@ -1248,7 +1248,7 @@ class Sign(SympyFunction):
12481248 }
12491249
12501250 def apply (self , x , evaluation ):
1251- "Sign [x_]"
1251+ "%(name)s [x_]"
12521252 # Sympy and mpmath do not give the desired form of complex number
12531253 if isinstance (x , Complex ):
12541254 return Expression ("Times" , x , Expression ("Power" , Expression ("Abs" , x ), - 1 ))
@@ -1592,7 +1592,7 @@ class Rational_(Builtin):
15921592 name = "Rational"
15931593
15941594 def apply (self , n , m , evaluation ):
1595- "Rational [n_Integer, m_Integer]"
1595+ "%(name)s [n_Integer, m_Integer]"
15961596
15971597 if m .to_sympy () == 1 :
15981598 return Integer (n .to_sympy ())
@@ -1659,7 +1659,7 @@ class Complex_(Builtin):
16591659 name = "Complex"
16601660
16611661 def apply (self , r , i , evaluation ):
1662- "Complex [r_?NumberQ, i_?NumberQ]"
1662+ "%(name)s [r_?NumberQ, i_?NumberQ]"
16631663
16641664 if isinstance (r , Complex ) or isinstance (i , Complex ):
16651665 sym_form = r .to_sympy () + sympy .I * i .to_sympy ()
@@ -2064,7 +2064,7 @@ class Piecewise(SympyFunction):
20642064 attributes = ("HoldAll" ,)
20652065
20662066 def apply (self , items , evaluation ):
2067- "Piecewise [items__]"
2067+ "%(name)s [items__]"
20682068 result = self .to_sympy (Expression ("Piecewise" , * items .get_sequence ()))
20692069 if result is None :
20702070 return
@@ -2130,7 +2130,7 @@ class Boole(Builtin):
21302130 attributes = ("Listable" ,)
21312131
21322132 def apply (self , expr , evaluation ):
2133- "Boole [expr_]"
2133+ "%(name)s [expr_]"
21342134 if isinstance (expr , Symbol ):
21352135 if expr == SymbolTrue :
21362136 return Integer (1 )
0 commit comments