NumPy
NumPy is the numeric engine under pandas, scikit-learn, and deep learning. Fast array math is the foundation of ML.
Learn it
Learn the ndarray: a grid of numbers you can operate on all at once (vectorization) instead of slow loops. Learn indexing, slicing, shapes, and broadcasting.
By the end you’ll be able to
- Create and manipulate arrays
- Vectorise numeric operations
Free resources
- NumPy — The Absolute Basics for Beginners (docs)(opens in a new tab)Start here
ndarray, indexing, broadcasting from the source
Free - Keith Galli — Complete NumPy Tutorial (video)(opens in a new tab)
Popular hands-on walkthrough
Free~1 hr - NumPy — Quickstart (docs)(opens in a new tab)
Faster-paced reference on vectorization
Free
Practice
Create a 2D array of exam scores and compute the mean per student and per subject without a Python loop.
Build it — your output
A notebook that generates a random array of numbers and computes summary statistics using only vectorized NumPy operations.
Prove it — check yourself
You’re ready to move on when you can honestly say yes to each:
- Can you create and reshape an array?
- Can you do math on arrays without loops?
- Do you understand what broadcasting does?
Do it with AI
Use a free AI tool as your tutor and pair-programmer. Copy a prompt below into Claude, ChatGPT, or Gemini (for building, try Cursor or Copilot).
The habit: Try it yourself first — a little struggle is where the learning actually happens. Then ask for a hint before the answer — never copy blindly.
- Understand itClaude / ChatGPT / Gemini
I'm a beginner learning "NumPy". Explain it in simple terms with a real-world analogy, then ask me ONE question to check my understanding — don't reveal the answer.
- PracticeClaude / ChatGPT / Gemini
Give me 3 short practice problems on "NumPy" (my goal: create and manipulate arrays), from easy to hard. Don't include the solutions yet — I'll try them first, then ask you to check.
- Get unstuckClaude / ChatGPT / Gemini
I'm stuck on this exercise about "NumPy": [paste your attempt here]. Give me ONE small hint to move forward — do NOT give me the full solution.
- Build & reviewCursor / Copilot
Here is my work for a "NumPy" task: [paste your code or answer]. Review it: point out what's wrong and WHY, and suggest improvements — but let me make the fixes myself.
- Prove itClaude / ChatGPT / Gemini
Quiz me on "NumPy". Ask me 5 questions one at a time, wait for my answer each time, then tell me if I'm right and briefly why.