Python Quest

Track 14 · Lesson 2 of 12

Vectorised operations

Do arithmetic on whole arrays at once, let broadcasting line up shapes, and aggregate along rows or columns with axis.

About 40 minIntermediate3 exercises

You will be able to

  • Apply arithmetic and functions to every element of an array without a loop
  • Predict how broadcasting combines an array with a scalar or a smaller array
  • Aggregate with sum, mean, min, max and std, overall and along an axis
  • Explain why vectorised code is preferred over Python loops for numeric data

Included with a Formula Quest membership

It has 3 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.

View Formula Quest memberships

Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.