NumPy reference#

NumPy reference

#

Release:2.6.dev0

Date:September 09, 2026

This reference manual details functions, modules, and objects included in NumPy, describing what they are and what they do. For learning how to use NumPy, see the

complete documentation

.

Python API

#

NumPy’s module structure

Array objects

The N-dimensional array (ndarray)

Scalars

Data type objects (dtype)

Data type promotion in NumPy

Iterating over arrays

Standard array subclasses

Masked arrays

The array interface protocol

Datetimes and timedeltas

Universal functions (ufunc)

Routines and objects by topic

Constants

Array creation routines

Array manipulation routines

Bit-wise operations

String functionality

Datetime support functions

Data type routines

Mathematical functions with automatic domain

Floating point error handling

Exceptions and Warnings

Discrete Fourier Transform

Functional programming

Input and output

Indexing routines

Linear algebra

Logic functions

Masked array operations

Mathematical functions

Miscellaneous routines

Polynomials

Random sampling

Set routines

Sorting, searching, and counting

Statistics

Test support

Window functions

Typing (numpy.typing)

C API

#

NumPy C-API

Python types and C-structures

System configuration

Data type API

Array API

Array iterator API

ufunc API

Generalized universal function API

NpyString API

NumPy core math library

Datetime API

C API deprecations

Memory management in NumPy

Other topics

#

Array API standard compatibility

CPU/SIMD optimizations

Thread Safety

Global Configuration Options

NumPy security

Testing guidelines

Status of numpy.distutils and migration advice

NumPy and SWIG

Acknowledgements

#

Large parts of this manual originate from Travis E. Oliphant’s book

Guide to NumPy

(which generously entered Public Domain in August 2008). The reference documentation for many of the functions are written by numerous contributors and developers of NumPy.