Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable_pylab(import_all=False) still imports np #3436

Closed
asmeurer opened this issue Jun 16, 2013 · 4 comments · Fixed by #3568
Closed

enable_pylab(import_all=False) still imports np #3436

asmeurer opened this issue Jun 16, 2013 · 4 comments · Fixed by #3568
Labels
Milestone

Comments

@asmeurer
Copy link
Contributor

In SymPy, we use ip.enable_pylab(import_all=False). But it seems that it still imports np. I didn't check if any other names are accidentally imported as well.

@minrk
Copy link
Member

minrk commented Jun 16, 2013

I think there are probably a few. We should finally make a clean split between the eventloop hookup and the namespace population, which should make it more obvious that we are doing things correctly.

@takluyver
Copy link
Member

The import_all flag controls whether or not we do from matplotlib.pylab import *; from numpy import *, but we unconditionally import numpy, matplotlib, pylab, mlab and pyplot. See this function.

I agree that that's not terribly clear - I had also assumed that setting import_all to False would result in nothing being added to the user namespace. Can we just repurpose the existing parameter, or should we add a second one, like import_packages?

@asmeurer
Copy link
Contributor Author

Repurpose the existing name, I would say.

@minrk
Copy link
Member

minrk commented Jul 6, 2013

#3568 should implement this change - now import_all=False should result in no names added to user_ns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants