MISSION 507

Arithmetic with NumPy Arrays

In the previous mission, we've learned that the core data structure used by NumPy is ndarrays. We've learned how to access information in ndarrays and how to extracts part of that information using array slicing.

In this mission, we will learn why NumPy is so important for working with data. In a nutshell, NumPy provides a very efficient way to perform calculations on numerical data.

In particular, you'll:

  1. Learn how to make calculations with ndarrays.
  2. Learn why these calculations run much faster than the same operations on lists.
  3. Learn about a processor feature called Single Instruction Multiple Data (SIMD).
  4. Compare execution times of ndarray operations with list operations.

As with all Dataquest missions, this is an interactive learning experience. You'll be writing real Python code and using NumPy in our browser-based coding environment so there's no setup and no obstacles between you and learning!

Objectives

  • Learn how to make calculations with ndarrays.
  • Compare execution times of ndarray operations with list operations.

Mission Outline

  1. Introduction
  2. Adding ndarrays
  3. Comparing ndarrays to Lists
  4. Comparing NumPy arrays to Lists
  5. Arithmetic Operations
  6. Arithmetic in Higher Dimensions
  7. Minimum and Maximum
  8. The Axis Parameter
  9. Sum
  10. Next Steps
pandas-fundamentals

Course Info:

Intermediate

This is part of our NumPy for Data Engineers course. View Details.

This course includes five missions. It is the ninth course in the Data Engineer path.

START LEARNING FREE

Take a Look Inside