Previous | Next --- Slide 6 of 50
Back to Lecture Thumbnails
sareyan

Can anyone provide any illumination on NumPy's implementation to a casual Python user?

michzrrr

What is so crucial about the use of the term sequence here, in how it relates to the next slide. I imagine that in many examples we will discuss, the data is not in this special kind of data structure that is a "sequence" (but maybe I am wrong)

pranil

To reply to michzrrr: I see that all the data-parallel examples that we discussed are in fact sequences as defined on this slide and the next. Sequences are just a more abstract way of thinking about container classes. They are just ordered chunks of data that cannot be indexed into. These lectures talk about sequences instead of lists/vectors to show how powerful sequence operations like map, filter, sort, etc are. None of them ever use indexing to write the program.

pranil

I was also curious about sareyan's question and looked it up. One of the interesting things I found is that numpy in particular implements its vectorized parallel code in C and not Python. This is their official git: https://github.com/numpy/numpy

Please log in to leave a comment.