cst 383 - Week 1
For our the first week, time was spent setting up Anaconda and learning the fundamentals of Python along with an introduction to NumPy. While the basic syntax was straightforward, it was good review to revisit the distinction between expressions and statements and how expressions produce values while statements perform actions.
An interesting topic this week was the difference between standard Python lists and NumPy arrays. took a look at how NumPy is faster for numerical operations largely due to how data is stored in memory. NumPy arrays store elements of the same type in a contiguous block of memory, which makes access much more efficient. This allows NumPy to take advantage of low level optimizations showing that that NumPy’s speed is not just about better algorithms, but also about how data is structured and processed.
Practice with manipulating arrays using slicing and fancy indexing, as well as creating and working with multidimensional arrays was a big part of the homework. The basic idea of slicing was review, but fancy indexing is something I had not worked with before. Fancy indexing feels like it will be a powerful tool once I have become more familiar with it. Combining it with multidimensional arrays made for some interesting problems where I had to take a moment to think through the logic as it’s easy to lose track of what part of the array is being accessed.
A topic from the readings I found interesting was about how Python became the go to language in data science. Python was designed prioritizing readability and accessibility, which lowers the barrier to entry for new programmers. The ease of use seems like a major reason why Python became so widely adopted. It makes me think about how important language design is.
Comments
Post a Comment