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
Hi everybody,
I just read through the lesson material in Episode 2 and found that the "Data Type" box states that "A Numpy array contains one or more elements of the same type." That isn't technically true. It can contain zero or more elements. Is there a very good (maybe pedagogical) reason for keeping that way? Something I overlooked? Otherwise, I would be strongly opposed to having false statements in the lesson and propose a change!
Best,
Julian
The text was updated successfully, but these errors were encountered:
If we're talking about lists x = [] or if the episode on lists is taught before episode 2, I would 100% agree with you.
The way the episode introduces loading existing data from a file seems to me the course is a data science first approach to teaching Python, so it doesn't seem motivating that it's possible you can load an array with nothing.
I personally think this issue or omission of detail is the result of not introducing fundamental data types (eg lists) before touching on numpy arrays
Well, I would consider it quite probable actually that sooner or later you encounter an empty array, e.g. some masking operation was always False or even if you have corrupt data and some of the files you read are just empty.
Maybe one could just omit the explicit count, e.g. "[...] contains one or more elements of the same type." --> "[...] contains elements of the same type." Variations of this could include a further comment in parenthesis or the like.
This would be formally correct and focuses even stronger on the actual statement, i.e. that it's the same type.
Hi everybody,
I just read through the lesson material in Episode 2 and found that the "Data Type" box states that "A Numpy array contains one or more elements of the same type." That isn't technically true. It can contain zero or more elements. Is there a very good (maybe pedagogical) reason for keeping that way? Something I overlooked? Otherwise, I would be strongly opposed to having false statements in the lesson and propose a change!
Best,
Julian
The text was updated successfully, but these errors were encountered: