Skip to content

Conversation

@Mahdisadjadi
Copy link
Contributor

@Mahdisadjadi Mahdisadjadi commented Jun 13, 2016

Add a few lines to find out the type of elements (e.g floats, ints) in numpy arrays after mentioning shape and attributes of an array.

Add a few lines to find out the type of elements (e.g floats, ints) in numpy arrays.
@tbekolay
Copy link
Contributor

tbekolay commented Jun 13, 2016

Currently, we don't talk about the distinction between integers and floating point numbers in the first NumPy topic, though we do talk about it in a later topic. What do you think the benefit of introducing this early on is? The NumPy topic already as a lot of material in it, many have argued too much, so I would be much more keen on removing material from this topic than adding material to it.

@Mahdisadjadi
Copy link
Contributor Author

Yes that's right we talk about them in Creating Functions lesson but I think among all attributes shape and dtype all more important and useful. So I think the emphasis should not be on the distinction between integers and floating point numbers but on how to find the type of an array.

@tbekolay
Copy link
Contributor

But given that at this point in the lesson we have not introduced the difference between integers and floating point numbers, is the type of the array meaningful to students at this point? Perhaps discussing the dtype would be better done as a callout box in the Creating Functions lesson? Like I mentioned before, the first topic is already way too long, so I don't think that I am okay with adding anything without taking anything away.

@Mahdisadjadi
Copy link
Contributor Author

Actually Creating Functions lesson talks about dtype in passing parameters to loadtxt. Do you think adding a callout box right after that is useful?
Alternatively, we can talk about loading a file with integers using loadtxt (non-default value for dtype).

@tbekolay
Copy link
Contributor

Hmm, perhaps the callout box makes more sense right after the "Integer division" callout? That's the only place where we're really explicitly talking about integers and floats.

@tbekolay tbekolay merged commit 25baa7f into swcarpentry:gh-pages Jun 22, 2016
@tbekolay
Copy link
Contributor

OK, I think I'm convinced that this is the right place since this is where we use the type function. I've merged this now, and rearranged it slightly to flow better with the rest of the lesson (also made this a callout).

rgaiacs pushed a commit to rgaiacs/swc-python-novice-inflammation that referenced this pull request May 6, 2017
Fixed links in _extras/exercises.md that were lost.
maxim-belkin pushed a commit that referenced this pull request May 23, 2018
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

Successfully merging this pull request may close these issues.

2 participants