Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny error in Episode 2 #1008

Open
chillenzer opened this issue Sep 15, 2022 · 2 comments
Open

Tiny error in Episode 2 #1008

chillenzer opened this issue Sep 15, 2022 · 2 comments

Comments

@chillenzer
Copy link

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

@shermanlo77
Copy link

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

@chillenzer
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants