Skip to content

Commit c147bd1

Browse files
committed
some updates to numpy nb
1 parent 105d145 commit c147bd1

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

notebooks/part0_python_intro/05_numpy.ipynb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
"print('a[:10]: ', a[:10])\n",
534534
"\n",
535535
"#or print the values from position 20 to the end\n",
536-
"print('a[90:]', a[20:])"
536+
"print('a[20:]', a[20:])"
537537
]
538538
},
539539
{
@@ -576,7 +576,7 @@
576576
"metadata": {},
577577
"outputs": [],
578578
"source": [
579-
"a[slice(50, None, 5)]"
579+
"a[slice(10, None, 5)]"
580580
]
581581
},
582582
{
@@ -643,6 +643,15 @@
643643
"#what do you think? Do you think numpy has an identity function?"
644644
]
645645
},
646+
{
647+
"cell_type": "code",
648+
"execution_count": null,
649+
"metadata": {},
650+
"outputs": [],
651+
"source": [
652+
"np.eye(10)"
653+
]
654+
},
646655
{
647656
"cell_type": "markdown",
648657
"metadata": {},
@@ -772,7 +781,7 @@
772781
"metadata": {},
773782
"outputs": [],
774783
"source": [
775-
"# are they the same shape and have all the xam\n",
784+
"# are they the same shape and have all the same values\n",
776785
"np.array_equal(a, b), np.array_equal(b,c)"
777786
]
778787
},
@@ -1748,7 +1757,7 @@
17481757
],
17491758
"metadata": {
17501759
"kernelspec": {
1751-
"display_name": "pyclass",
1760+
"display_name": "Python 3 (ipykernel)",
17521761
"language": "python",
17531762
"name": "python3"
17541763
},
@@ -1762,7 +1771,7 @@
17621771
"name": "python",
17631772
"nbconvert_exporter": "python",
17641773
"pygments_lexer": "ipython3",
1765-
"version": "3.11.7"
1774+
"version": "3.12.11"
17661775
}
17671776
},
17681777
"nbformat": 4,

0 commit comments

Comments
 (0)