From: Michael Orlitzky Date: Fri, 22 Nov 2024 19:04:24 +0000 (-0500) Subject: mjo/misc.py: don't import sage.all X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=eafc845abb7c4dfbd9bfd860ec392c61bb4bf840;p=sage.d.git mjo/misc.py: don't import sage.all --- diff --git a/mjo/misc.py b/mjo/misc.py index 1b3a5a9..b2c1859 100644 --- a/mjo/misc.py +++ b/mjo/misc.py @@ -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)