From c234ac373c91b3956ec6a5932bd205b5685ccc8c Mon Sep 17 00:00:00 2001 From: Yash Bhardwaj Date: Fri, 11 Oct 2019 02:11:28 +0530 Subject: [PATCH] Update 1. NumPy.ipynb Added New functions, function lists and descriptions. --- 1. NumPy.ipynb | 1212 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 803 insertions(+), 409 deletions(-) diff --git a/1. NumPy.ipynb b/1. NumPy.ipynb index d157876..a2ca585 100644 --- a/1. NumPy.ipynb +++ b/1. NumPy.ipynb @@ -4,7 +4,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialization" + "\n", + "### Initialization\n", + "\n", + "Numpy Array Creation Routines" ] }, { @@ -18,7 +21,45 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "x = np.empty([3,3])" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[0.00000000e+000, 0.00000000e+000, 6.94582274e-310],\n", + " [6.94582971e-310, 6.94582969e-310, 6.94582963e-310],\n", + " [6.94582965e-310, 6.94582971e-310, 3.95252517e-322]])" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "An empty array initializes a numpy array with random values" + ] + }, + { + "cell_type": "code", + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -27,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -46,7 +87,7 @@ " [0., 0., 0.]]])" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -57,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -70,7 +111,7 @@ " [1, 1, 1, 1]]])" ] }, - "execution_count": 10, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -79,9 +120,16 @@ "np.ones((2,2,4), dtype=int)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "By using dttype, we can set the type of values that the numpy array contains." + ] + }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -91,7 +139,7 @@ " ['hellott', 'hellott']], dtype='