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

define new component with np requires config.py #948

Closed
sean-lockwood opened this issue Apr 12, 2016 · 3 comments
Closed

define new component with np requires config.py #948

sean-lockwood opened this issue Apr 12, 2016 · 3 comments

Comments

@sean-lockwood
Copy link

If the user does not have a ~/.glue/config.py file containing an import for numpy, then they are unable to define new components containing np in the expressions.

@sean-lockwood
Copy link
Author

In core/parse.py, the global environmental variables don't necessarily include np. Perhaps import it and add it to the env dict there?

@astrofrog
Copy link
Member

@sean-lockwood - good idea - I'm working on this here: #956 (I'm going to make some more improvements before merging it)

@astrofrog
Copy link
Member

@sean-lockwood - I've now merged in some changes that make it possible to use numpy, np, and math. You can either try the latest developer version of glue, or I will release 0.8 soon which will include these changes. Let me know if you run into any issues!

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

No branches or pull requests

2 participants