Skip to content

Commit 8421ffc

Browse files
author
William Glass
committed
update packages.ipynb
1 parent 34c56d2 commit 8421ffc

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

content/good_practice/packages.ipynb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"source": [
4848
"Installing Python packages is very simple and one of the most popular package managers to achieve this is `pip`. Here, `pip` accesses the [Python Package Index](https://pypi.org/) (`PyPI`) that contains a large number of Python packages.\n",
4949
"\n",
50-
"For our example we need the `NumPy` package and this can be installed via the following command in our terminal:\n",
50+
"For our example we need the `NumPy` package and this can be installed via the following command at the terminal/anaconda prompt (see [here](https://pythoninchemistry.org/import-anything) for more information about different operating systems):\n",
5151
"\n",
5252
"```bash\n",
5353
"pip install numpy\n",
@@ -99,7 +99,7 @@
9999
"cosine_angle = cos(angle)\n",
100100
"```\n",
101101
"\n",
102-
"However, this can sometimes have unintended consequences if these functions share the same name with variables in a longer script. This problem can also arise using `from numpy import *`, which imports all functions without the need to use the `numpy.` syntax. To get around this it is common (and recommended) to `import` packages and rename them:\n",
102+
"However, this can sometimes have unintended consequences if these functions share the same name with variables in a longer script. This problem can also arise using `from numpy import *`, which imports all functions without the need to use the `numpy.` syntax. To get around this it is common to `import` packages and rename them:\n",
103103
"\n",
104104
"```python\n",
105105
"## Import the specific functions from numpy\n",
@@ -110,23 +110,15 @@
110110
"cosine_angle = np.cos(angle)\n",
111111
"```\n",
112112
"\n",
113-
"Although our example has used the `numpy` package, there are a large number of packages to choose from and each have a customary name that is often used. These include `matplotlib`, `pandas`, and `scipy`:\n",
113+
"Although our example has used the `numpy` package, there are a large number of packages to choose from and each have a customary name that is often used. For example:\n",
114114
"\n",
115115
"```python\n",
116116
"import matplotlib as mpl \n",
117117
"import matplotlib.pyplot as plt \n",
118118
"import numpy as np\n",
119119
"import pandas as pd\n",
120-
"import scipy as sp\n",
121120
"``` "
122121
]
123-
},
124-
{
125-
"cell_type": "code",
126-
"execution_count": null,
127-
"metadata": {},
128-
"outputs": [],
129-
"source": []
130122
}
131123
],
132124
"metadata": {

0 commit comments

Comments
 (0)