NumPy Basics: Part 2

Ha Khanh Nguyen (hknguyen)


1. Array Indexing & Slicing

1.1 Indexing & slicing with one-dimensional arrays

1.2 Indexing & slicing with higer-dimension arrays

1.3 Boolean Indexing


2. Universal Functions: Fast Element-wise Array Functions

Exercise

Convert the following code segment from built-in Python list to NumPy arrays:


3. Pseudorandom Number Generator


This lecture note is modified from Chapter 4 of Wes McKinney's Python for Data Analysis 2nd Ed.