Professional Documents
Culture Documents
● Volunteer to lead a study group - it can be anytime that works for you, 1hr each week. See thread in #py-for-ds-
announcements
○ If you haven’t been tagged by Monday, review any 2 projects that don’t have comments yet - sharing is
caring 🤗
Community ❤️🤗
Numpy Foundations
- Differences between Numpy and Python Lists
- Numpy Basics (initialization, indexing, slicing)
- Math operations and computation on arrays (broadcasting)
- File Input / Output (genfromtxt)
- Aggregations on arrays (concatenation, stack)
Why Numpy?
Lists Numpy
Why Numpy?
- Fixed Type Storage - Contiguous Memory
- “dtype”: int16, int32, float, etc.
- Much less space used than python lists
- Optimized for numeric data Data elements stored
contiguously in computer
memory, allowing parallel
NumPy processing
8 12 2 3 Int16: 00000000 00001001
7 5 11 9 Lists
Size (Int16)
18 10 4 6 Reference Count (Int32)
Object Type (Int32)
Object Value (Int64)
Numpy Basics
- arr_3d[row, :, :] ?
Examples
shape: (17,000, 9)
shape: (batch_size, h, w, c)
4D Matrix - batch of images
Math operations on Numpy Arrays
Numpy is optimized to perform all kinds of math operations between arrays and matrices.
Sum of matrices?
Matrix multiplication?
○ Volunteer to lead a study group - it can be anytime that works for you, 1hr each week.
See thread in #announcements