swcarpentry / python-novice-inflammation

Programming with Python
http://swcarpentry.github.io/python-novice-inflammation/
Other
303 stars 781 forks source link

Conditional episode only partially restores state #1051

Closed edbennett closed 5 months ago

edbennett commented 1 year ago

Episode 7 includes the text

Therefore, if you’re working in a new Python session, make sure to load the module with:

import numpy

But the subsequent code block then refers to data, which will not be defined if the learner (or instructor) is in a new Python session.

I'd suggest that either this section should re-load the data, or the quoted section should be removed, for consistency. (My personal preference would be the former.)

AlbertoImg commented 5 months ago

Hi @edbennett, thanks for your contribution. The suggestion is now in the last version. Thanks again!