-
Notifications
You must be signed in to change notification settings - Fork 664
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
import numpy as np #392
Comments
I for one also use In any case, I do see it's a widespread standard, one which saves three keystrokes per function call, and I won't make much of a fuss if the majority of the devs vote to switch to that. |
I still use the explicit |
|
I am for this change as well. Unless there are objections, I suggest adding this to 0.12. |
I think I've been changing numpy to np where I've been getting annoyed with long lines, so I guess I'm in favour. I think it'd be good to make a wiki page with some sort of loose style guide which includes stuff like this. |
There seems to be a consensus (or at least no fierce opposition) for using import numpy as np so let's do that. While we are at it, we should probably also avoid direct imports of numpy objects from numpy import sin, cos and consistently use import numpy as np
np.sin(...) instead. I don't think that any of the other major packages are used as extensively in MDAnalysis so I would prefer keeping long versions of |
I started preparing a PR to change the usage of numpy consistently. I should be through with the revision of all changes today or tomorrow. |
I've noticed that
numpy
is always imported with it's full name instead of the more standartimport numpy as np
. I'm incredibly used to that from other projects (anything in the python scientific stack) and my own code. I writenp.<function i want to use>
all the time and then wonder why my code-linter is lighting the line with an error. It would be nice to adopt the more standartimport numpy as np
in the whole library.The text was updated successfully, but these errors were encountered: