|
@@ -338,7 +338,6 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "# a vector: the argument to the array function is a Python list\n",
|
|
|
"v = np.array([1,2,3,4])\n",
|
|
|
"v"
|
|
|
]
|
|
@@ -366,7 +365,6 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "# a matrix: the argument to the array function is a nested Python list\n",
|
|
|
"M = np.array([[1, 2], [3, 4]])\n",
|
|
|
"M"
|
|
|
]
|
|
@@ -667,8 +665,7 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "# create a range\n",
|
|
|
- "x = np.arange(0, 10, 1) # arguments: start, stop, step\n",
|
|
|
+ "x = np.arange(0, 10, 1) \n",
|
|
|
"print(x)"
|
|
|
]
|
|
|
},
|
|
@@ -695,7 +692,8 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "x = np.arange(-1, 1, 0.1) # floating point step-wise range generatation\n",
|
|
|
+ "# floating point step-wise range generatation\n",
|
|
|
+ "x = np.arange(-1, 1, 0.1) \n",
|
|
|
"print(x)"
|
|
|
]
|
|
|
},
|
|
@@ -2674,7 +2672,6 @@
|
|
|
}
|
|
|
],
|
|
|
"metadata": {
|
|
|
- "celltoolbar": "Slideshow",
|
|
|
"kernelspec": {
|
|
|
"display_name": "Python 3",
|
|
|
"language": "python",
|