You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The convention in the NumPy documentation is to use import numpy as np and then for examplenp.array(...) in code.
Currently Biopython for the most part uses import numpy and numpy.array(...) with only some newer code using the shorthand.
I am proposing we switch all our NumPy usage and examples to use the import numpy as np style, which should be familiar to most Biopython users dealing with NumPy.
If people agree, this would be a good first-issue for newcomers to work on (e.g. taking each different top level module one at a time).
I vote against. It is unnecessary work, it adds to the style rules we have to follow, and numpy is explicit and therefore less confusing, especially for newcomers.
So would you rather we switch the handful of import numpy as np to the more explicit import numpy style? Or just leave things as they are with a mixture?
@peterjc Leave things as they are. There are bigger things to worry about in Biopython. Currently we have 311 open issues and 83 pull requests in progress; let's handle those first.
I can definitely work on this if you guys do decide to go with the standard numpy import convention, which IMO is a good idea. Since at this matured point and time in the Python community, np really does not, would not and should not refer to anything else other than numpy.
Also as I'm not a current contributor to Biopython (though I'd definitely like to, and this would be a good opportunity for me to get some basic familiarity with the code base), my working on this does not dilute the project's contributor resources, at least in theory, so long as I do not introduce regressions or breaks, which shouldn't be the case given the nature of this change, though I'd of course be thorough with the testing nonetheless.
Activity
mdehoon commentedon Dec 9, 2019
I vote against. It is unnecessary work, it adds to the style rules we have to follow, and
numpyis explicit and therefore less confusing, especially for newcomers.peterjc commentedon Dec 9, 2019
So would you rather we switch the handful of
import numpy as npto the more explicitimport numpystyle? Or just leave things as they are with a mixture?MarkusPiotrowski commentedon Dec 9, 2019
I would be in favor of using
import numpy as npbut if we can't agree on that, I would leave things (mixed) as they are.mdehoon commentedon Dec 9, 2019
@peterjc Leave things as they are. There are bigger things to worry about in Biopython. Currently we have 311 open issues and 83 pull requests in progress; let's handle those first.
jyscao commentedon Dec 10, 2019
I can definitely work on this if you guys do decide to go with the standard numpy import convention, which IMO is a good idea. Since at this matured point and time in the Python community,
npreally does not, would not and should not refer to anything else other than numpy.Also as I'm not a current contributor to Biopython (though I'd definitely like to, and this would be a good opportunity for me to get some basic familiarity with the code base), my working on this does not dilute the project's contributor resources, at least in theory, so long as I do not introduce regressions or breaks, which shouldn't be the case given the nature of this change, though I'd of course be thorough with the testing nonetheless.
peterjc commentedon Dec 13, 2019
Thanks @jyscao - hopefully there are other newcomer friendly issues you might want to tackle?
Let's close this for now - and perhaps revisit it next year?