Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions notebooks/02.02-The-Basics-Of-NumPy-Arrays.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@
"*The text is released under the [CC-BY-NC-ND license](https://creativecommons.org/licenses/by-nc-nd/3.0/us/legalcode), and code is released under the [MIT license](https://opensource.org/licenses/MIT). If you find this content useful, please consider supporting the work by [buying the book](http://shop.oreilly.com/product/0636920034919.do)!*"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #3.    print("x3 size: ", x3.size)

Comment on line 3 of the code cell


Reply via ReviewNB

Copy link
Owner Author

@amit1rrr amit1rrr Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is @amit2rrr


Reply via ReviewNB

]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# This is a trial cell\n",
"# O mamma mia"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# This is another a trial cell\n",
"# O mamma mia"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -60,20 +78,6 @@
"We'll use NumPy's random number generator, which we will *seed* with a set value in order to ensure that the same random arrays are generated each time this code is run:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np2\n",
"np.random.seed(0) # seed for reproducibility\n",
"\n",
"x1 = np2.random.randint(10, size=6) # One-dimensional array\n",
"x2 = np2.random.randint(10, size=(3, 4)) # Two-dimensional array\n",
"x3 = np2.random.randint(10, size=(3, 4, 5)) # Three-dimensional array"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down