Closed glass-w closed 4 years ago
Hey @WG150,
It seems to me that as things stand, this is covering #15 more than #14. Are you still going to add the non-custom packages stuff. In my head, pip install numpy
and import numpy as np
comes before custom modules.
Anyway some comments on what we have here:
_
syntax in imports cause it isn't immediately clear how it would be used. Thanks for the comments @arm61
It seems to me that as things stand, this is covering #15 more than #14. Are you still going to add the non-custom packages stuff.
Yeah I think you're right, would it be worth combining #14 and #15 into one section or is it best to keep them separate? For the non-custom stuff: I have written a section on custom modules but do you mean covering packages not available on pypi
?
In my head,
pip install numpy
andimport numpy as np
comes before custom modules
Good point, I can move things around so that these are introduced at the start. Also, is it worth covering Conda?
I think keeping things separate makes more sense, I think that small accessible sections makes for easier reading. However, I do think that #15 should follow directly on from #14.
.py
file, here is how to use it in a notebook or another script (which is basically what you have in this PR).My only worry with covering conda is that is muddies the water a bit, there is probably benefit to saying "pip is the most common way to install packages, however other methods such as conda exist" then link out to some documentation on conda. I am happy to have my mind changed on that though!
Ok that sounds good to me, I've now pretty much covered #15 in this PR so I'll just make a new PR for that and change the content for this one addressing #14 (sorry for the confusion).
I agree about Conda, I think a short sentence or two to make the reader aware and pointing them to resources etc would be best.
I've combined both #14 and #15 into this PR
Comments:
packages.ipynb
sp
a commonly used abbreviation for scipy
?custom_modules.ipynb
_
in import@arm61 thanks, here's what I've done:
packages.ipynb
import scipy as sp
to avoid confusion. custom_modules.ipynb
_
usage and updated print_things.py
module.PYTHONPATH
and linked to custom packages.I think it's almost ready now, let me know what you think.
Incidentally I hardly use import scipy as sp
, I tend to just use the modules directly. It'd be interesting to see what other users think / do?!
I don't think I have ever import scipy
or import scipy as sp
, I am the same as you, e.g. from scipy import stats
.
I will merge now, looks good!
Makes a start on a general introduction to python packages and modules, addressing #14. Currently in good practice section but could be moved to basics.