Courses

Learn NumPy

15 lessons · 0 completed

Start
0%
  1. 1 Introduction to NumPy: The Data Science Engine The "Why": Python Lists vs. NumPy Arrays 🚀Installation and Environment SetupImporting NumPy: The Standard `import numpy as np`Your First Array: Hello NumPy!
  2. 2 Forging Arrays: Creation and Initialization From Lists to Arrays: `np.array()`Built-in Creators: `zeros()`, `ones()`, and `full()`Generating Sequences: `arange()` and `linspace()`Creating Identity Matrices: `eye()`
  3. 3 Array Anatomy: Understanding the Core Structure Dimensions and Shape: `ndim` and `shape`Data Types: Classifying Array Contents with `dtype` 🏷️Array Size and Memory: `size` and `itemsize`Type Casting: Changing Data Types with `astype()`
  4. 4 Basic Indexing and Slicing: Accessing Your Data 1D Array Indexing: Familiar Ground (Like Python Lists)2D Array Indexing: Navigating Rows and Columns with `[row, col]`Slicing 1D Arrays: The `start:stop:step` PatternSlicing Multi-Dimensional Arrays: Grabbing Sub-matrices
  5. 5 Advanced Indexing: Filtering and Selecting Intelligently Fancy Indexing: Selecting Multiple Specific ElementsBoolean Indexing: Filtering with Conditional MasksCombining Conditions: The `&` (AND) and `|` (OR) OperatorsConditional Logic Simplified: Mastering `np.where()`
  6. 6 Shape-Shifting: Array Manipulation Changing Dimensions: The `reshape()` MethodFlattening Data: `flatten()` vs. `ravel()`Expanding Dimensions: Using `np.newaxis` and `expand_dims()`Transposing Arrays: Swapping Axes
  7. 7 Joining and Splitting: Building with Array Lego Blocks 🧱 Concatenation: Merging Arrays with `np.concatenate()`Stacking Arrays: `vstack()`, `hstack()`, and `dstack()`Breaking Arrays Apart: `split()`, `vsplit()`, and `hsplit()`Duplicating Elements: `repeat()` and `tile()`
  8. 8 Array Math and Universal Functions (ufuncs) Element-wise Arithmetic: Vectorized Math OperationsMathematical ufuncs: Exponentials, Logs, and TrigonometryHandling Missing Data: Dealing with `np.nan` and `np.isnan()`Rounding Values: `round()`, `floor()`, and `ceil()`
  9. 9 Broadcasting: NumPy's Secret Superpower ✨ What is Broadcasting? The Core ConceptThe Rules of Broadcasting: How Dimensions AlignBroadcasting Scalars to ArraysBroadcasting Arrays of Different Shapes (Practical Examples)
  10. 10 Aggregations and Statistics: Summarizing Your Data Basic Aggregations: `sum()`, `min()`, and `max()`The Power of `axis`: Calculating Down Rows or Across ColumnsStatistical Measures: `mean()`, `median()`, `var()`, and `std()`Finding Extreme Indices: `argmin()` and `argmax()`
  11. 11 Sorting, Searching, and Counting Sorting Arrays: `np.sort()` vs In-place SortingIndirect Sorting: Unlocking the Magic of `np.argsort()`Searching for Elements: `np.searchsorted()`Finding Uniques and Counts: `np.unique()` and `np.bincount()`
  12. 12 Random Number Generation (The `random` Module) 🎲 The Modern Generator API: `np.random.default_rng()`Continuous Distributions: Uniform and Normal (Gaussian)Discrete Sampling: Random Integers and `choice()`Randomizing Order: `shuffle()` and `permutation()`
  13. 13 Linear Algebra Basics with NumPy (`np.linalg`) Vector Dot Products and Matrix Multiplication: `np.dot()` and `@`Matrix Inverses and DeterminantsSolving Systems of Linear EquationsUnderstanding Vector Norms: `np.linalg.norm()`
  14. 14 File I/O: Saving and Loading Data 💾 Exporting Data: Saving Arrays to Text Files with `np.savetxt()`Importing Data: Loading CSVs with `np.genfromtxt()`Saving to Native NumPy Formats: `.npy` and `.npz`Loading Native Formats: Efficiently Restoring Data with `np.load()`
  15. 15 Performance and Vectorization: Writing Fast Code ⚡ The Vectorization Mindset: Banning Python For-LoopsBenchmarking Speed: Comparing Lists vs ArraysViews vs. Copies: Understanding NumPy Memory EfficiencyPractical Project: Basic Image Manipulation as NumPy Arrays