diff --git a/getting_started/04_numpy.ipynb b/getting_started/04_numpy.ipynb index 23b4131ecdd19d26f411a08610cdbc0c851138f5..bccf81a46347a23fed03a371d09d3f0096f1204b 100644 --- a/getting_started/04_numpy.ipynb +++ b/getting_started/04_numpy.ipynb @@ -1404,7 +1404,7 @@ "metadata": {}, "source": [ "But if you are writing a script or application using Numpy, I implore you to\n", - "Numpy (and its commonly used sub-modules) like this instead:" + "import Numpy (and its commonly used sub-modules) like this instead:" ] }, { @@ -1497,12 +1497,12 @@ "By now you should be aware that a Numpy `array` does not behave in quite the\n", "same way as a Matlab matrix. The primary difference between Numpy and Matlab\n", "is that in Numpy, the `*` operator denotes element-wise multiplication,\n", - "gwhereas in Matlab, `*` denotes matrix multiplication.\n", + "whereas in Matlab, `*` denotes matrix multiplication.\n", "\n", "\n", "Numpy does support the `@` operator for matrix multiplication, but if this is\n", - "a complete show-stopper for you - if you just can't bring yourself to write `A\n", - "@ B` to denote the matrix product of `A` and `B` - if you _must_ have your\n", + "a complete show-stopper for you - if you just can't bring yourself to write\n", + "`A @ B` to denote the matrix product of `A` and `B` - if you _must_ have your\n", "code looking as Matlab-like as possible, then you should look into the Numpy\n", "[`matrix`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.matrix.html)\n", "data type.\n", diff --git a/getting_started/04_numpy.md b/getting_started/04_numpy.md index 8ea10a8521108c14c0c4a37a39dca132e961da4d..3a28cc830442b08628633cd04372f9091a6683ee 100644 --- a/getting_started/04_numpy.md +++ b/getting_started/04_numpy.md @@ -1055,7 +1055,7 @@ print(d) But if you are writing a script or application using Numpy, I implore you to -Numpy (and its commonly used sub-modules) like this instead: +import Numpy (and its commonly used sub-modules) like this instead: ``` @@ -1124,12 +1124,12 @@ print(np.atleast_2d(r).T) By now you should be aware that a Numpy `array` does not behave in quite the same way as a Matlab matrix. The primary difference between Numpy and Matlab is that in Numpy, the `*` operator denotes element-wise multiplication, -gwhereas in Matlab, `*` denotes matrix multiplication. +whereas in Matlab, `*` denotes matrix multiplication. Numpy does support the `@` operator for matrix multiplication, but if this is -a complete show-stopper for you - if you just can't bring yourself to write `A -@ B` to denote the matrix product of `A` and `B` - if you _must_ have your +a complete show-stopper for you - if you just can't bring yourself to write +`A @ B` to denote the matrix product of `A` and `B` - if you _must_ have your code looking as Matlab-like as possible, then you should look into the Numpy [`matrix`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.matrix.html) data type.