You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/numpy.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1446,11 +1446,11 @@ F.plot(ax)
1446
1446
:label: np_ex4
1447
1447
```
1448
1448
1449
-
Recall that [broadcasting](broadcasting) in Numpy can help us conduct element-wise operations on arrays with different numbers of dimensions without using `for` loops.
1449
+
Recall that [broadcasting](broadcasting) in Numpy can help us conduct element-wise operations on arrays with different number of dimensions without using `for` loops.
1450
1450
1451
1451
In this exercise, try to use a `for` loop to replicate the result of the following code.
1452
1452
1453
-
Meanwhile, observe the time difference between broadcasting and the `for` loop you implement.
1453
+
Meanwhile, compare the speeds of broadcasting and the `for` loop you implement.
1454
1454
1455
1455
```{code-cell} python3
1456
1456
import quantecon as qe
@@ -1501,7 +1501,7 @@ qe.toc()
1501
1501
1502
1502
Note that the `for` loop takes much longer than the broadcasting operation.
1503
1503
1504
-
Compare your answer with the output of broadcasting
0 commit comments