From 00945ecbbe918517e697ec8e4a25c464c554ecf9 Mon Sep 17 00:00:00 2001 From: Sounak97 <34378847+Sounak97@users.noreply.github.com> Date: Wed, 26 Sep 2018 00:12:33 +0530 Subject: [PATCH 1/5] Created using Colaboratory --- Sounak97.ipynb | 134 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 104 insertions(+), 30 deletions(-) diff --git a/Sounak97.ipynb b/Sounak97.ipynb index 9e2543a..105dd29 100644 --- a/Sounak97.ipynb +++ b/Sounak97.ipynb @@ -1,32 +1,106 @@ { - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Sounak97.ipynb", + "version": "0.3.2", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + } }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.5.2" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + "cells": [ + { + "metadata": { + "id": "ahm2qZERkD2t", + "colab_type": "code", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 168 + }, + "outputId": "714872ae-d4e3-46ea-b101-2fe900730884" + }, + "cell_type": "code", + "source": [ + "#1) Create any random list and assign it to a variable dummy_list\n", + "dummy_list=[100,300,200,500,400]\n", + "print(dummy_list)#2) print dummy_list\n", + "dummy_list.reverse()\n", + "print(dummy_list)#3) Reverse dummy_list and print\n", + "dummy_list_2 = [2, 200, 16, 4, 1, 0, 9.45, 45.67, 90, 12.01, 12.02]\n", + "dummy_list=dummy_list + dummy_list_2#4) Add the list dummy_list_2 to the previous dummy_list and now print dummy_list\n", + "print(dummy_list)\n", + "dummy_dict={}\n", + "k=2\n", + "for i in dummy_list:\n", + " dummy_dict[i]=k*2\n", + " k=k+1\n", + "print(dummy_dict) #5) Create a dictionary named dummy_dict which contains all the elements of dummy_list as keys and frequency as values.6) print dummy_dict\n", + "dummy_list.sort()#7) Sort dummy_list in ascending order as well as descending order and print the changed lists\n", + "print(dummy_list)\n", + "dummy_list.sort(reverse=True)\n", + "print(dummy_list)\n", + "x=200#8) Remove the first item from the list whose value is equal to x. It raises a ValueError if there is no such item.\n", + "p=0\n", + "j=0\n", + "for j in dummy_list:\n", + " if j==x :\n", + " dummy_list.remove(j)\n", + " break\n", + " else:\n", + " j=j+1\n", + " p=p+1\n", + " \n", + "if p==len(dummy_list):\n", + " print(\"ValueError\")\n", + "else:\n", + " print(dummy_list)\n", + " \n", + "x=14#9) Remove the item at position x. x is any random integer\n", + "if(x>len(dummy_list)):\n", + " print(\"Out of Range\")\n", + "else:\n", + " del dummy_list[x]\n", + "print(dummy_list)\n", + "del dummy_list[:]#10) Let's clean everything clear the list and then print\n", + "print(dummy_list)\n", + "\n", + " \n", + " \n", + "\n" + ], + "execution_count": 11, + "outputs": [ + { + "output_type": "stream", + "text": [ + "[100, 300, 200, 500, 400]\n", + "[400, 500, 200, 300, 100]\n", + "[400, 500, 200, 300, 100, 2, 200, 16, 4, 1, 0, 9.45, 45.67, 90, 12.01, 12.02]\n", + "{400: 4, 500: 6, 200: 16, 300: 10, 100: 12, 2: 14, 16: 18, 4: 20, 1: 22, 0: 24, 9.45: 26, 45.67: 28, 90: 30, 12.01: 32, 12.02: 34}\n", + "[0, 1, 2, 4, 9.45, 12.01, 12.02, 16, 45.67, 90, 100, 200, 200, 300, 400, 500]\n", + "[500, 400, 300, 200, 200, 100, 90, 45.67, 16, 12.02, 12.01, 9.45, 4, 2, 1, 0]\n", + "[500, 400, 300, 200, 100, 90, 45.67, 16, 12.02, 12.01, 9.45, 4, 2, 1, 0]\n", + "[500, 400, 300, 200, 100, 90, 45.67, 16, 12.02, 12.01, 9.45, 4, 2, 1]\n", + "[]\n" + ], + "name": "stdout" + } + ] + }, + { + "metadata": { + "id": "5mZI6Q3q1cCb", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "" + ] + } + ] +} \ No newline at end of file From ee9926e55c226d686f02a4a0d347dabcc7ced468 Mon Sep 17 00:00:00 2001 From: Sounak97 <34378847+Sounak97@users.noreply.github.com> Date: Wed, 26 Sep 2018 02:50:26 +0530 Subject: [PATCH 2/5] Created using Colaboratory --- Sounak97.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sounak97.ipynb b/Sounak97.ipynb index 105dd29..8d729e4 100644 --- a/Sounak97.ipynb +++ b/Sounak97.ipynb @@ -73,7 +73,7 @@ " \n", "\n" ], - "execution_count": 11, + "execution_count": 0, "outputs": [ { "output_type": "stream", From a579efc3c0c586d5d25d0f69c0f8b4cb5223a402 Mon Sep 17 00:00:00 2001 From: Sounak97 <34378847+Sounak97@users.noreply.github.com> Date: Wed, 26 Sep 2018 04:33:44 +0530 Subject: [PATCH 3/5] Created using Colaboratory --- Sounak97_numpy.ipynb | 133 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 Sounak97_numpy.ipynb diff --git a/Sounak97_numpy.ipynb b/Sounak97_numpy.ipynb new file mode 100644 index 0000000..54287a9 --- /dev/null +++ b/Sounak97_numpy.ipynb @@ -0,0 +1,133 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Sounak97_numpy.ipynb", + "version": "0.3.2", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + } + }, + "cells": [ + { + "metadata": { + "id": "AIms-GFlfGg1", + "colab_type": "code", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 722 + }, + "outputId": "19213d69-47dc-426f-cbf4-b5348c9eb17a" + }, + "cell_type": "code", + "source": [ + "import numpy as np#Import numpy\n", + "a=np.array([100,200,300])\n", + "print(a)\n", + "print(type(a))\n", + "\n", + "b=np.array([[10,20,30],[40,50,60]]) #Create numpy arrays\n", + "print(b.shape)\n", + "print(b[0,0],b[0,1],b[1,0])\n", + "a=np.zeros(shape=(2,2))#Some basic functions for creating arrays\n", + "b=np.ones(shape=(3,3))\n", + "c=np.eye(2)\n", + "d=np.full(shape=(3,3),fill_value=5)\n", + "e=np.random.random((2,2))\n", + "print('a',a)\n", + "print('b',b)\n", + "print('c',c)\n", + "print('d',d)\n", + "print('e',e)\n", + "a==np.arange(10) #execute and understand\n", + "b==np.linspace(0,10,num=6)\n", + "print(a)\n", + "print(b)\n", + "\n", + "x=np.array([[1,2],[3,4]])#Arithmetic operations\n", + "print(np.sum(x))\n", + "print(np.sum(x,axis=0))#sum of each column\n", + "print(np.sum(x,axis=1))#sum of each row\n", + "b=np.arange(10)#Boolean Mask use\n", + "print(b)\n", + "mask=b%2!=0\n", + "print(mask)\n", + "print(b[mask])\n", + "mod_b=b\n", + "mod_b[mask]=-1\n", + "print(mod_b)\n", + "a=np.arange(9).reshape(3,3)#swapping 2 colums\n", + "print(a)\n", + "print(a[:,[1,0,2]])\n", + "a=np.arange(9).reshape(3,3)#swapping 2 rows\n", + "print(a)\n", + "print(a[[1,0,2],:])\n", + "\n", + "\n", + "\n", + "\n" + ], + "execution_count": 20, + "outputs": [ + { + "output_type": "stream", + "text": [ + "[100 200 300]\n", + "\n", + "(2, 3)\n", + "10 20 40\n", + "a [[0. 0.]\n", + " [0. 0.]]\n", + "b [[1. 1. 1.]\n", + " [1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "c [[1. 0.]\n", + " [0. 1.]]\n", + "d [[5 5 5]\n", + " [5 5 5]\n", + " [5 5 5]]\n", + "e [[0.30145182 0.0820182 ]\n", + " [0.64159066 0.576512 ]]\n", + "[[0. 0.]\n", + " [0. 0.]]\n", + "[[1. 1. 1.]\n", + " [1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "10\n", + "[4 6]\n", + "[3 7]\n", + "[0 1 2 3 4 5 6 7 8 9]\n", + "[False True False True False True False True False True]\n", + "[1 3 5 7 9]\n", + "[ 0 -1 2 -1 4 -1 6 -1 8 -1]\n", + "[[0 1 2]\n", + " [3 4 5]\n", + " [6 7 8]]\n", + "[[1 0 2]\n", + " [4 3 5]\n", + " [7 6 8]]\n", + "[[0 1 2]\n", + " [3 4 5]\n", + " [6 7 8]]\n", + "[[3 4 5]\n", + " [0 1 2]\n", + " [6 7 8]]\n" + ], + "name": "stdout" + }, + { + "output_type": "stream", + "text": [ + "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:19: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.\n", + "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:20: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.\n" + ], + "name": "stderr" + } + ] + } + ] +} \ No newline at end of file From fecb5b02863e12564c0d3c9766f99e8f18fe2877 Mon Sep 17 00:00:00 2001 From: Sounak97 <34378847+Sounak97@users.noreply.github.com> Date: Wed, 26 Sep 2018 23:10:39 +0530 Subject: [PATCH 4/5] Created using Colaboratory --- Sounak97.ipynb | 263 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) diff --git a/Sounak97.ipynb b/Sounak97.ipynb index 8d729e4..0788ab6 100644 --- a/Sounak97.ipynb +++ b/Sounak97.ipynb @@ -69,6 +69,7 @@ "del dummy_list[:]#10) Let's clean everything clear the list and then print\n", "print(dummy_list)\n", "\n", + "\n", " \n", " \n", "\n" @@ -92,6 +93,268 @@ } ] }, + { + "metadata": { + "id": "VwSRD8sVvAFC", + "colab_type": "code", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 857 + }, + "outputId": "371e4abd-fa21-42eb-9804-cb9be93e584e" + }, + "cell_type": "code", + "source": [ + "import numpy as np#Import numpy\n", + "a=np.array([100,200,300])\n", + "print(a)\n", + "print(type(a))\n", + "\n", + "b=np.array([[10,20,30],[40,50,60]]) #Create numpy arrays\n", + "print(b.shape)\n", + "print(b[0,0],b[0,1],b[1,0])\n", + "a=np.zeros(shape=(2,2))#Some basic functions for creating arrays\n", + "b=np.ones(shape=(3,3))\n", + "c=np.eye(2)\n", + "d=np.full(shape=(3,3),fill_value=5)\n", + "e=np.random.random((2,2))\n", + "print('a',a)\n", + "print('b',b)\n", + "print('c',c)\n", + "print('d',d)\n", + "print('e',e)\n", + "a==np.arange(10) #execute and understand\n", + "b==np.linspace(0,10,num=6)\n", + "print(a)\n", + "print(b)\n", + "a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])#Array Indexing\n", + "b = a[:2, 1:3]\n", + "print(a[0,1])\n", + "b[0,0]=77\n", + "print(a[0,1])\n", + "a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])#slicing\n", + "row_r1 = a[1, :] \n", + "row_r2 = a[1:2, :]\n", + "print(row_r1,row_r1.shape)\n", + "print(row_r2,row_r2.shape)\n", + "col_r1=a[:,1]\n", + "col_r2=a[:,1:2]\n", + "print(col_r1, col_r1.shape)\n", + "print(col_r2, col_r2.shape)\n", + "\n", + "\n", + "x=np.array([[1,2],[3,4]])#Arithmetic operations\n", + "print(np.sum(x))\n", + "print(np.sum(x,axis=0))#sum of each column\n", + "print(np.sum(x,axis=1))#sum of each row\n", + "b=np.arange(10)#Boolean Mask use\n", + "print(b)\n", + "mask=b%2!=0\n", + "print(mask)\n", + "print(b[mask])\n", + "mod_b=b\n", + "mod_b[mask]=-1\n", + "print(mod_b)\n", + "a=np.arange(9).reshape(3,3)#swapping 2 colums\n", + "print(a)\n", + "print(a[:,[1,0,2]])\n", + "a=np.arange(9).reshape(3,3)#swapping 2 rows\n", + "print(a)\n", + "print(a[[1,0,2],:])\n", + "\n" + ], + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "text": [ + "[100 200 300]\n", + "\n", + "(2, 3)\n", + "10 20 40\n", + "a [[0. 0.]\n", + " [0. 0.]]\n", + "b [[1. 1. 1.]\n", + " [1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "c [[1. 0.]\n", + " [0. 1.]]\n", + "d [[5 5 5]\n", + " [5 5 5]\n", + " [5 5 5]]\n", + "e [[0.58957867 0.78449677]\n", + " [0.17984702 0.68954991]]\n", + "[[0. 0.]\n", + " [0. 0.]]\n", + "[[1. 1. 1.]\n", + " [1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "2\n", + "77\n", + "[5 6 7 8] (4,)\n", + "[[5 6 7 8]] (1, 4)\n", + "[ 2 6 10] (3,)\n", + "[[ 2]\n", + " [ 6]\n", + " [10]] (3, 1)\n", + "10\n", + "[4 6]\n", + "[3 7]\n", + "[0 1 2 3 4 5 6 7 8 9]\n", + "[False True False True False True False True False True]\n", + "[1 3 5 7 9]\n", + "[ 0 -1 2 -1 4 -1 6 -1 8 -1]\n", + "[[0 1 2]\n", + " [3 4 5]\n", + " [6 7 8]]\n", + "[[1 0 2]\n", + " [4 3 5]\n", + " [7 6 8]]\n", + "[[0 1 2]\n", + " [3 4 5]\n", + " [6 7 8]]\n", + "[[3 4 5]\n", + " [0 1 2]\n", + " [6 7 8]]\n" + ], + "name": "stdout" + }, + { + "output_type": "stream", + "text": [ + "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:19: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.\n", + "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:20: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.\n" + ], + "name": "stderr" + } + ] + }, + { + "metadata": { + "id": "JTnipVXrvLwo", + "colab_type": "code", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 638 + }, + "outputId": "b7a95e69-ccca-4dd9-cb68-57d7f287dcd7" + }, + "cell_type": "code", + "source": [ + "\n", + "\n", + "\n", + "import numpy as np#Create a uniform subdivision of the interval -1.3 to 2.5 with 64 subdivisions\n", + "A=np.linspace(-1.3,2.5,64)\n", + "print(A)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "n=int(input())# Generate an array of length 3n filled with the cyclic pattern 1, 2, 3\n", + "B=np.array([1,2,3])\n", + "B=np.resize(B,3*n)\n", + "print(B)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "b1=np.arange(1,20,2)#Create an array of the first 10 odd integers.\n", + "print(b1)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "a=np.array([1,2,3,2,3,4,3,4,5,6])#Find intersection of a and b\n", + "b = np.array([7,2,10,2,7,4,9,4,9,8])\n", + "np.intersect1d(a,b)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "a1=np.arange(10)# Reshape 1d array a to 2d array of 2X5\n", + "print(a1)\n", + "a1=a1.reshape(2,5)\n", + "print(a1)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "a2=[1,2,3,4,5,6,7,8,9]#conversion\n", + "a2=np.array(a2)#numpy list to array\n", + "print(a2)\n", + "a2.tolist()#numpy array to list\n", + "print(a2)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "a3=np.ones(shape=(10,10))# Create a 10 x 10 arrays of zeros and then \"frame\" it with a border of ones.\n", + "a3[1:9,1:9]=0\n", + "print(a3)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "a4=np.ones(shape=(8,8))#Create an 8 x 8 array with a checkerboard pattern of zeros and ones using a slicing+striding approach.\n", + "a4[::2,1::2]=0\n", + "a4[1::2,::2]=0\n", + "print(a4)" + ], + "execution_count": 2, + "outputs": [ + { + "output_type": "stream", + "text": [ + "[-1.3 -1.23968254 -1.17936508 -1.11904762 -1.05873016 -0.9984127\n", + " -0.93809524 -0.87777778 -0.81746032 -0.75714286 -0.6968254 -0.63650794\n", + " -0.57619048 -0.51587302 -0.45555556 -0.3952381 -0.33492063 -0.27460317\n", + " -0.21428571 -0.15396825 -0.09365079 -0.03333333 0.02698413 0.08730159\n", + " 0.14761905 0.20793651 0.26825397 0.32857143 0.38888889 0.44920635\n", + " 0.50952381 0.56984127 0.63015873 0.69047619 0.75079365 0.81111111\n", + " 0.87142857 0.93174603 0.99206349 1.05238095 1.11269841 1.17301587\n", + " 1.23333333 1.29365079 1.35396825 1.41428571 1.47460317 1.53492063\n", + " 1.5952381 1.65555556 1.71587302 1.77619048 1.83650794 1.8968254\n", + " 1.95714286 2.01746032 2.07777778 2.13809524 2.1984127 2.25873016\n", + " 2.31904762 2.37936508 2.43968254 2.5 ]\n", + "6\n", + "[1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3]\n", + "[ 1 3 5 7 9 11 13 15 17 19]\n", + "[0 1 2 3 4 5 6 7 8 9]\n", + "[[0 1 2 3 4]\n", + " [5 6 7 8 9]]\n", + "[1 2 3 4 5 6 7 8 9]\n", + "[1 2 3 4 5 6 7 8 9]\n", + "[[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 0. 0. 0. 0. 0. 0. 0. 0. 1.]\n", + " [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]]\n", + "[[1. 0. 1. 0. 1. 0. 1. 0.]\n", + " [0. 1. 0. 1. 0. 1. 0. 1.]\n", + " [1. 0. 1. 0. 1. 0. 1. 0.]\n", + " [0. 1. 0. 1. 0. 1. 0. 1.]\n", + " [1. 0. 1. 0. 1. 0. 1. 0.]\n", + " [0. 1. 0. 1. 0. 1. 0. 1.]\n", + " [1. 0. 1. 0. 1. 0. 1. 0.]\n", + " [0. 1. 0. 1. 0. 1. 0. 1.]]\n" + ], + "name": "stdout" + } + ] + }, { "metadata": { "id": "5mZI6Q3q1cCb", From e65d59ce6dcbba6c5efe439f45e4b1267e165b01 Mon Sep 17 00:00:00 2001 From: Sounak97 <34378847+Sounak97@users.noreply.github.com> Date: Fri, 28 Sep 2018 21:43:51 +0530 Subject: [PATCH 5/5] Created using Colaboratory --- Sounak97.ipynb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Sounak97.ipynb b/Sounak97.ipynb index 0788ab6..f3b9fa1 100644 --- a/Sounak97.ipynb +++ b/Sounak97.ipynb @@ -22,7 +22,7 @@ "base_uri": "https://localhost:8080/", "height": 168 }, - "outputId": "714872ae-d4e3-46ea-b101-2fe900730884" + "outputId": "c840c130-e0b3-422d-dab3-a9515a47bcdf" }, "cell_type": "code", "source": [ @@ -34,11 +34,8 @@ "dummy_list_2 = [2, 200, 16, 4, 1, 0, 9.45, 45.67, 90, 12.01, 12.02]\n", "dummy_list=dummy_list + dummy_list_2#4) Add the list dummy_list_2 to the previous dummy_list and now print dummy_list\n", "print(dummy_list)\n", - "dummy_dict={}\n", - "k=2\n", - "for i in dummy_list:\n", - " dummy_dict[i]=k*2\n", - " k=k+1\n", + "dummy_dict={100:1,300:1,200:2,500:1,400:1,2:1,16:1,4:1,1:1,0:1,9.45:1,45.67:1,90:1,12.01:1,12.02:1}\n", + "\n", "print(dummy_dict) #5) Create a dictionary named dummy_dict which contains all the elements of dummy_list as keys and frequency as values.6) print dummy_dict\n", "dummy_list.sort()#7) Sort dummy_list in ascending order as well as descending order and print the changed lists\n", "print(dummy_list)\n", @@ -74,7 +71,7 @@ " \n", "\n" ], - "execution_count": 0, + "execution_count": 2, "outputs": [ { "output_type": "stream", @@ -82,7 +79,7 @@ "[100, 300, 200, 500, 400]\n", "[400, 500, 200, 300, 100]\n", "[400, 500, 200, 300, 100, 2, 200, 16, 4, 1, 0, 9.45, 45.67, 90, 12.01, 12.02]\n", - "{400: 4, 500: 6, 200: 16, 300: 10, 100: 12, 2: 14, 16: 18, 4: 20, 1: 22, 0: 24, 9.45: 26, 45.67: 28, 90: 30, 12.01: 32, 12.02: 34}\n", + "{100: 1, 300: 1, 200: 2, 500: 1, 400: 1, 2: 1, 16: 1, 4: 1, 1: 1, 0: 1, 9.45: 1, 45.67: 1, 90: 1, 12.01: 1, 12.02: 1}\n", "[0, 1, 2, 4, 9.45, 12.01, 12.02, 16, 45.67, 90, 100, 200, 200, 300, 400, 500]\n", "[500, 400, 300, 200, 200, 100, 90, 45.67, 16, 12.02, 12.01, 9.45, 4, 2, 1, 0]\n", "[500, 400, 300, 200, 100, 90, 45.67, 16, 12.02, 12.01, 9.45, 4, 2, 1, 0]\n", @@ -163,7 +160,7 @@ "print(a[[1,0,2],:])\n", "\n" ], - "execution_count": 1, + "execution_count": 0, "outputs": [ { "output_type": "stream", @@ -308,7 +305,7 @@ "a4[1::2,::2]=0\n", "print(a4)" ], - "execution_count": 2, + "execution_count": 0, "outputs": [ { "output_type": "stream",