On Tue, Jan 22, 2013 at 6:41 PM, Roberto Colistete Jr. <[email protected]> wrote: > Em 22-01-2013 22:23, Aaron Meurer escreveu: >> >> On Tue, Jan 22, 2013 at 2:38 PM, Roberto Colistete Jr. >> <[email protected]> wrote: >> >>> Thanks, so I think it is better : >>> >>> In [1]: %pylab inline >>> In [2]: from sympy.interactive import * >>> In [3]: init_session() >>> >>> or, with simpler initialization (no symbols, etc) : >>> >>> In [1]: %pylab inline >>> In [2]: from sympy import * >>> In [3]: init_printing() >>> >>> I know that PyLab and SymPy contexts are mixed, e.g, pylab.plot is >>> overwritten by sympy.plotting.plot. > > > Sorry, I was wrong. After the code above, there is pylab.plot and plot > (from SymPy). They are overwritten if we do a "from pylab import *" and > "from sympy import *", of course. > > >> If you enable pylab using the IPython API, you can avoid importing >> numpy and all that other stuff. Do >> >> ip = get_ipython() >> ip.enable_pylab(gui='inline', import_all=False) > > > Thanks for the tip. But importing numpy is fast, even in smartphones.
It's not the speed that's the issue. Those libraries will be imported anyway eventually. The point is that you don't want to pollute the namespace with numpy functions. That could be confusing to users, who might think they are SymPy functions, and be surprised when they don't quite work with SymPy expressions. Aaron Meurer > > As far as I tested, for the moment, the simplest way to open IPython > Notebook with PyLab and then SymPy with inline plots and pretty printing, is > to call : > $ ipython notebook --pylab=inline --profile=sympy > The user can create a script or even a icon launcher (e.g., in > /usr/share/applications/ipnb-pylab-sympy.desktop). > > Obviously, it would be nice to have something like "% sympy inline" to > start SymPy in interactive mode and online plots. > > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
