--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/e7047efc-7a68-4ee2-9aa9-aa912ee81df5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-1-0268b93691c7> in <module>() ----> 1 t = np.arange(0,1,0.01) NameError: name 'np' is not defined
You can add it to the Jupyter server's profile. See this Stack Overflow answer for pretty much your exact scenario.Cheers!-Adrian
On Mon, Aug 22, 2016 at 10:08 AM, Ryan Krauss <ryan...@gmail.com> wrote:
I am having a hard time getting a good answer to what I think is a simple question. I want my students to try the jupyter notebook and I think we will pretty much always need these 3 lines at the start of every notebook file:%matplotlib inlineimport matplotlib.pyplot as pltimport numpy as npWhat is the easiest way to prevent them from having to re-type those lines every time? Keep in mind that many of my students will be learning python from scratch as we start my class.Thanks,Ryan
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
Thanks,Ryan
I would reconsider, and perhaps just import those when you need them. Or, create a standard way of loading them (maybe a standard magic, or create your own). Maybe you want to create your own python module around matplotlib, to make it even easier?
Is there anything like a user configurable template for ipython notebooks?
There seem to be many answers on stackexchange or wherever talking about how people use to do the automatic importing for IPython before Jupyter. Is this functionality that has been deliberately removed?
I have put these lines in ~/.jupyter/jupyter_notebook_config.py but it doesn't work.c = get_config()# ... Any other configurables you want to setc.InteractiveShellApp.matplotlib = "inline"