internalsGet Pro

Module 02 · Lesson 2 of 8Pro

NumPy: arrays and vectorized maths

Level
Beginner
Topic
Python for machine learning
Reading time
14 min

When you finish this page you can

  1. Explain why maths on a NumPy array runs far faster than the same maths in a Python loop.
  2. Read an array’s shape and dtype, and estimate its memory as rows × columns × bytes.
  3. Predict the result shape of a broadcast, and spot the one that silently builds a huge array.
  4. Choose between a whole-array operation, a Python loop and a loop over chunks.
  1. Data, features and labels14 min
  2. The ML toolkit: a map of libraries and platforms13 min

2.4 million numbers, one line of code

is our example online store. Every Monday its growth team, led by Joseph, sends vouchers to customers a model says will stop buying: a model. Farah, an ML engineer, builds it on a sample sized for a free : 200,000 customers.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan