Routines In this chapter routine docstrings are presented, grouped by functionality. Many docstrings contain example code, which demonstrates basic usage of the routine. The examples assume that NumPy is imported with: >>> import numpy as np
 A convenient way to execute examples is the %doctest_mode mode of IPython, which allows for pasting of multi-line examples and preserves indentation.  
Array creation routines From shape or value From existing data Creating record arrays (numpy.rec) Creating character arrays (numpy.char) Numerical ranges Building matrices The Matrix class   
Array manipulation routines Basic operations Changing array shape Transpose-like operations Changing number of dimensions Changing kind of array Joining arrays Splitting arrays Tiling arrays Adding and removing elements Rearranging elements   
Binary operations Elementwise bit operations Bit packing Output formatting   
String operations String operations Comparison String information Convenience class   C-Types Foreign Function Interface (numpy.ctypeslib) 
Datetime Support Functions numpy.datetime_as_string numpy.datetime_data Business Day Functions   
Data type routines numpy.can_cast numpy.promote_types numpy.min_scalar_type numpy.result_type numpy.common_type numpy.obj2sctype Creating data types Data type information Data type testing Miscellaneous   
Optionally SciPy-accelerated routines (numpy.dual) Linear algebra FFT Other   
Mathematical functions with automatic domain (numpy.emath) Functions   
Floating point error handling Setting and getting error handling Internal functions   
Discrete Fourier Transform (numpy.fft) Standard FFTs Real FFTs Hermitian FFTs Helper routines Background information Implementation details Type Promotion Normalization Real and Hermitian transforms Higher dimensions References Examples   
Functional programming numpy.apply_along_axis numpy.apply_over_axes numpy.vectorize numpy.frompyfunc numpy.piecewise   
NumPy-specific help functions Finding help Reading help   
Input and output NumPy binary files (NPY, NPZ) Text files Raw binary files String formatting Memory mapping files Text formatting options Base-n representations Data sources Binary Format Description   
Linear algebra (numpy.linalg) The @ operator Matrix and vector products Decompositions Matrix eigenvalues Norms and other numbers Solving equations and inverting matrices Exceptions Linear algebra on several matrices at once   
Logic functions Truth value testing Array contents Array type testing Logical operations Comparison   
Masked array operations Constants Creation Inspecting the array Manipulating a MaskedArray Operations on masks Conversion operations Masked arrays arithmetic   
Mathematical functions Trigonometric functions Hyperbolic functions Rounding Sums, products, differences Exponents and logarithms Other special functions Floating point routines Rational routines Arithmetic operations Handling complex numbers Extrema Finding Miscellaneous   
Matrix library (numpy.matlib) numpy.matlib.empty numpy.matlib.zeros numpy.matlib.ones numpy.matlib.eye numpy.matlib.identity numpy.matlib.repmat numpy.matlib.rand numpy.matlib.randn   
Miscellaneous routines Performance tuning Memory ranges Array mixins NumPy version comparison Utility Matlab-like Functions Exceptions   
Padding Arrays numpy.pad   
Polynomials Transitioning from numpy.poly1d to numpy.polynomial Documentation for the polynomial Package Documentation for Legacy Polynomials   
Random sampling (numpy.random) Quick Start Introduction Concepts Features   
Set routines numpy.lib.arraysetops Making proper sets Boolean operations   
Sorting, searching, and counting Sorting Searching Counting   
Statistics Order statistics Averages and variances Correlating Histograms   
Test Support (numpy.testing) Asserts Asserts (not recommended) Decorators Test Running Guidelines   
Window functions Various windows