]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/misc.py: don't import sage.all
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Nov 2024 19:04:24 +0000 (14:04 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Nov 2024 19:04:24 +0000 (14:04 -0500)
mjo/misc.py

index 1b3a5a94090bb2bfa7120d355d3f25683c2116f2..b2c18598d9153a9a854a986ea947ed6695340ab7 100644 (file)
@@ -2,13 +2,18 @@
 Stuff that doesn't fit anywhere else.
 """
 
-from sage.all import *
-
-
 def legend_latex(obj):
     """
     Return the LaTeX representation of ``obj``, but wrap it in dollar
     ($) signs so that we can pass it directly to plot() et al. as a
     legend label.
+
+    EXAMPLES::
+
+        sage: from mjo.misc import legend_latex
+        sage: legend_latex(x)
+        '$x$'
+
     """
+    from sage.misc.latex import latex
     return '$%s$' % latex(obj)