diff --git a/index.md b/index.md index a2cc31a..93deca4 100644 --- a/index.md +++ b/index.md @@ -54,7 +54,7 @@ This is the training overview: [pe100]: ./theme1/PE100/PE100-01Introduction.ipynb [pe101]: ./theme1/PE101/python-packages-conda.ipynb -[pe102]: ./theme1/PE102/numerical-data-analysis.ipynb +[pe102]: ./theme1/PE102/PE102-02NumPy.ipynb [pe103]: ./theme1/PE103/vcs-testing-debugging.md [pe103-vcs]: ./theme1/PE103//vcs.qmd diff --git a/theme1/PE101/python-packages-conda.ipynb b/theme1/PE101/python-packages-conda.ipynb index 0c2c31a..467c5e0 100644 --- a/theme1/PE101/python-packages-conda.ipynb +++ b/theme1/PE101/python-packages-conda.ipynb @@ -41,8 +41,35 @@ "metadata": {}, "source": [ "There are literally oodles of mathematical functions already implemented for you in the `math` package. To see a list of them as they stand currently, see [math - mathematical functions](https://docs.python.org/3/library/math.html) in the current Python documentation.\n", - "\n" + "\n", + "Taking a look at the code above, the first thing we notice is the line `import math`. This tells the Python interpreter to find the package named \"math\" and to open it up and make its contents available to this session. The things in the package we can get to will all be named by the word \"math\", a period, and then the name of the actual part of the package to use. We would say the package \"math\" is imported into the \"math namespace\". This is the default behavior, but we can change that. Indeed:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.5728159131285796\n" + ] + } + ], + "source": [ + "import random as rand\n", + "\n", + "print(rand.random())" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/theme1/PE102/PE102-02NumPy.ipynb b/theme1/PE102/PE102-02NumPy.ipynb index f8c8077..ea353a4 100644 --- a/theme1/PE102/PE102-02NumPy.ipynb +++ b/theme1/PE102/PE102-02NumPy.ipynb @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 15, "id": "de084959-df71-493d-8e30-7ab89a5552cf", "metadata": {}, "outputs": [], @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 16, "id": "2b954fa8-72d4-4c2a-aa3a-250949c3ff11", "metadata": {}, "outputs": [ @@ -55,7 +55,7 @@ " [ 9, 10, 11, 12]])" ] }, - "execution_count": 6, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -78,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 17, "id": "7841cfe1-5e2a-4aa2-a87f-edc63c454ca4", "metadata": {}, "outputs": [ @@ -88,7 +88,7 @@ "array([0., 0., 0.])" ] }, - "execution_count": 3, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -108,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 18, "id": "58af786a-c914-4e42-acc3-87e25f68e022", "metadata": {}, "outputs": [ @@ -120,7 +120,7 @@ " [1., 1., 1.]])" ] }, - "execution_count": 4, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -140,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 19, "id": "ba910429-41d2-4c8d-a4e0-c690e354fba6", "metadata": {}, "outputs": [ @@ -186,7 +186,7 @@ " [1., 1., 1.]]]])" ] }, - "execution_count": 5, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -208,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 20, "id": "72fbfda8-ed6e-40dc-94e4-ce4ccefe0c66", "metadata": {}, "outputs": [ @@ -250,7 +250,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 21, "id": "2646ba7d-7d8c-4103-bf8d-da4a4bec05d4", "metadata": {}, "outputs": [ @@ -279,7 +279,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 22, "id": "25781f79-c2e5-4a78-bfd8-05b92f4fedd6", "metadata": {}, "outputs": [ @@ -307,7 +307,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 23, "id": "45637e00-2f0e-45b1-976f-d4c5ed4a4d72", "metadata": {}, "outputs": [ @@ -343,7 +343,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 24, "id": "7edc25f0-e902-4234-9a95-41597190e0c7", "metadata": {}, "outputs": [], @@ -361,7 +361,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 25, "id": "e4c96df7-c701-4a2a-87f8-ea545f01c980", "metadata": {}, "outputs": [ @@ -382,7 +382,7 @@ " [ 1., -1., -0.]])" ] }, - "execution_count": 8, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -405,7 +405,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 26, "id": "2a60a483-96e2-4929-a8a5-3c5d93332b8a", "metadata": {}, "outputs": [ @@ -417,7 +417,7 @@ " [0., 0., 1.]])" ] }, - "execution_count": 9, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -436,7 +436,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 27, "id": "33a135b2-6a0a-4b06-a59c-8956f0f77db4", "metadata": {}, "outputs": [ @@ -458,10 +458,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 14, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" },