SkyAICampus
HomePracticeLearnCode LabFocus
SkyAICampus
PrivacyTermssupport@skyaicampus.com© 2026 SkyAI Campus
Log inSign up

Learn

HomePracticeConcept cardsCode LabSky Tutor

Review

Revise todayMistake notebookProgress

Focus

Campus ForestFocus roomsSquads

Questions or feedback?
support@skyaicampus.com

  1. 1Array basics
  2. 2Maths on arrays
  3. 3Reshaping and filtering
← NumPy

Lesson 2 of 3

Maths on arrays

Watch, read the card, then practise. Maths on whole arrays · Sum, mean, max and more · Broadcasting

Video coming soon

The video for this lesson is being recorded.

Meanwhile, the notes below and the 60-second cards cover the same ideas.

Practise this topic
  • Maths on whole arrays

    Maths on an array works on every value at once, with no loop needed.

    Remember: No for loops: let NumPy do the whole array.

  • Sum, mean, max and more

    Aggregations squash an array into one number, or one number per row or column.

    Remember: axis=0 → one result per column. axis=1 → one per row.

  • Broadcasting

    Broadcasting lets NumPy combine arrays of different shapes by stretching the smaller one.

    Remember: Line the shapes up from the right; each pair must be equal or 1.

Try the example in Code Lab

import numpy as np
a = np.array([1, 2, 3])
b = np.array([10, 20, 30])
print((a * 2).tolist(), (a + b).tolist(), int(a @ b))
← Array basicsNext: Reshaping and filtering →

In this lesson

  • Maths on whole arrays
  • Sum, mean, max and more
  • Broadcasting

Practise this topic

5 questions at your level. The best way to make it stick.

Practise 5 questions