Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sci_python
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SCW2017
sci_python
Commits
8c19e710
Commit
8c19e710
authored
Oct 05, 2017
by
Inigo Aldazabal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove matplotlib section
parent
00c2dda5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
776 deletions
+122
-776
numpy-tutorial-clean.ipynb
numpy-tutorial-clean.ipynb
+39
-446
numpy-tutorial.ipynb
numpy-tutorial.ipynb
+83
-330
No files found.
numpy-tutorial-clean.ipynb
View file @
8c19e710
...
...
@@ -80,7 +80,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -119,34 +119,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -192,15 +165,6 @@
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
...
...
@@ -219,7 +183,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -249,34 +213,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -292,34 +229,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -367,16 +277,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -392,16 +293,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -417,34 +309,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -460,16 +325,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -520,16 +376,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -545,16 +392,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -577,7 +415,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -600,16 +438,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -636,6 +465,15 @@
" * `a_j = 2^(3*j) - j`\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
...
...
@@ -647,23 +485,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Comparisons\n"
"#### Comparisons
:
\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -679,26 +508,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -707,14 +517,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Shape mismatches
\n
"
"#### Shape mismatches"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -723,23 +533,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Transposition"
"#### Transposition
\n
"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -755,7 +556,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Linear algebra**
\n
"
"**Linear algebra**"
]
},
{
...
...
@@ -785,133 +586,6 @@
"* Look at the help for `np.triu` and `np.tril`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic matplotlib visualization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we have our first data arrays, we are going to visualize them.\n",
"\n",
"First tell the notebook to generate the figures inline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The `inline` is important for the notebook, so that plots are displayed\n",
"in the notebook and not in a new window.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Matplotlib* is a 2D plotting package. We can import its functions as\n",
"below:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And then use (note that you have to use `show` explicitly):\n",
"\n",
"```\n",
" plt.plot(x,y) # line plot\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* **1D plotting**:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* **2D arrays** (such as images):\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercise: Simple visualizations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* Plot some simple arrays / functions.\n",
"\n",
"* Try using the `gray` colormap.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
...
...
@@ -931,16 +605,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -971,7 +636,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -987,34 +652,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -1052,16 +690,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -1077,7 +706,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed":
fals
e
"collapsed":
tru
e
},
"outputs": [],
"source": []
...
...
@@ -1094,25 +723,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
...
...
@@ -1128,7 +739,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"
collapsed": fals
e
"
scrolled": tru
e
},
"outputs": [
{
...
...
@@ -1155,24 +766,6 @@
"You can also combine assignment and slicing:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
...
...
@@ -1199,9 +792,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.
0
"
"version": "3.6.
1
"
}
},
"nbformat": 4,
"nbformat_minor":
0
"nbformat_minor":
1
}
numpy-tutorial.ipynb
View file @
8c19e710
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment