Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · AI & Machine LearningFree

NumPy Documentation

The official NumPy docs, starting with the absolute beginner's guide: arrays, shapes, indexing, broadcasting, random numbers and saving data, with runnable examples. NumPy sits underneath pandas, scikit-learn and most of scientific Python, so an evening here makes everything built on it easier to understand.

GitHub stars

32.9k (numpy/numpy)

GitHub · Sept 2026

Latest release

2.5.3 (September 2026)

GitHub · Sept 2026

Docs version

NumPy 2.5 manual

numpy.org · Sept 2026

Format

Guide

Topic

AI & Machine Learning

Provider

NumPy

Time needed

A few evenings for the beginner's guide

Level

Beginner

Access

Free

What NumPy is and why you learn it

NumPy's own guide describes it as "an open source Python library that's widely used in science and engineering", built around the N-dimensional ndarray and a large library of functions that operate efficiently on it. In practice it is the foundation of data science in Python: pandas columns, images, model inputs and the outputs of scikit-learn are all NumPy arrays or built on them.

You do not need to master all of NumPy. You need to understand arrays, shapes, vectorised operations and broadcasting well enough that pandas and machine learning code stops feeling like magic.

Where to start in the docs

The documentation has four main parts: Getting Started, the User Guide, the API Reference and Release Notes. Start with NumPy: the absolute basics for beginners. It walks through, in order:

  • what an array is, array attributes and how to create arrays
  • adding, removing and sorting elements, shape and size, reshaping
  • indexing and slicing, including boolean masks
  • basic operations, broadcasting and useful aggregations
  • matrices, transposing, flattening and random number generation
  • unique values and counts, saving and loading arrays, CSV import and export
  • plotting arrays with Matplotlib

Type the examples into a notebook rather than reading them. Then use the User Guide when a concept needs more depth, and the API Reference to look up a function's parameters.

How long it takes

The beginner's guide is a few evenings if you run every example. Broadcasting and axis arguments are the two ideas that usually need a second pass.

Prerequisites

Comfortable basic Python: lists, loops, functions. A little school maths helps with the matrix sections, but you can skim those at first.

Free or paid?

Completely free and open source. The NumPy website also links to separate tutorials under Learn.

What you can do afterwards

Replace slow Python loops with vectorised operations, reason about the shape of any array you are handed, and read pandas and scikit-learn documentation without getting lost in "array-like" and axis=0.

Common questions

Should I learn NumPy before pandas? Learn the basics of arrays first, then move to pandas quickly. You will come back to NumPy naturally.

Which version should I read? The stable docs match the current release. If your project pins an older NumPy, use the version switcher.

Best for: new data science learners and anyone whose pandas or model code breaks on shape errors.

pythonmachine learningopen sourcebeginner friendly

Ready to start?

Opens on NumPy in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "NumPy Documentation". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.