Implicitly, it is assumed that students know some Python/Numpy/Scipy.
Perhaps this should be stated explicitly at the beginning of the course.
For people that know Numpy, Cupy will be easy, since it has the same API.
Needs expansion with at least two exercises.
Why does data have to be copied from the host to the device? This needs to be explained.
numpy.allclose is somewhat more elegant than diff.max() and diff.min().
The episode does not state where the commands should be executed. In an iPython shell, but this should be mentioned.
Remove the % signs, but not before the timeitcommand.
If you execute these command in Google Colab, you cannot zoom in on the figure after a pylab.imshow.
Zooming in is necessary for understanding, so a different approach is needed.
deltas.shape needs a print, so print(deltas.shape).
Implicitly, it is assumed that students know some Python/Numpy/Scipy. Perhaps this should be stated explicitly at the beginning of the course.
For people that know Numpy, Cupy will be easy, since it has the same API.
Needs expansion with at least two exercises.
Why does data have to be copied from the host to the device? This needs to be explained.
numpy.allclose
is somewhat more elegant thandiff.max()
anddiff.min()
.The episode does not state where the commands should be executed. In an iPython shell, but this should be mentioned. Remove the
%
signs, but not before thetimeit
command.If you execute these command in Google Colab, you cannot zoom in on the figure after a pylab.imshow. Zooming in is necessary for understanding, so a different approach is needed.
deltas.shape
needs a print, soprint(deltas.shape)
.