Created
July 19, 2022 12:16
-
-
Save flyfir248/39df84b25bf1a1032a234dd6202661da to your computer and use it in GitHub Desktop.
Website Notebook Classwork 3.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "Website Notebook Classwork 3.ipynb", | |
"provenance": [], | |
"authorship_tag": "ABX9TyNDiHTcUj9iZH1jDwpXbIC5", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/flyfir248/39df84b25bf1a1032a234dd6202661da/website-notebook-classwork-3.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "8ND5gQDrYnGC", | |
"outputId": "1a298091-5157-44b8-a72a-a3215bfc3f16" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"[[0 1 2 3]\n", | |
" [4 5 6 7]]\n" | |
] | |
} | |
], | |
"source": [ | |
"import numpy as np\n", | |
"\n", | |
"Array2D = np.arange(0, 8).reshape([2,4])\n", | |
"\n", | |
"print(Array2D)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"np.sum(Array2D, axis = 1)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "EByDIkFWYsUa", | |
"outputId": "35681ea0-0bf4-4a03-ef18-81c71660cc99" | |
}, | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([ 6, 22])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 2 | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment