Numpy manual contentsΒΆ
- NumPy User Guide
- Setting up
- Quickstart tutorial
- Numpy basics
- Data types
- Array creation
- I/O with Numpy
- Indexing
- Assignment vs referencing
- Single element indexing
- Other indexing options
- Index arrays
- Indexing Multi-dimensional arrays
- Boolean or “mask” index arrays
- Combining index arrays with slices
- Structural indexing tools
- Assigning values to indexed arrays
- Dealing with variable numbers of indices within programs
- Broadcasting
- Byte-swapping
- Structured arrays
- Subclassing ndarray
- Credits
- Introduction
- View casting
- Creating new from template
- Relationship of view casting and new-from-template
- Implications for subclassing
- Simple example - adding an extra attribute to ndarray
- Slightly more realistic example - attribute added to existing array
__array_wrap__for ufuncs- Extra gotchas - custom
__del__methods and ndarray.base
- Miscellaneous
- Numpy for Matlab users
- Building from source
- Using Numpy C-API
- How to extend NumPy
- Using Python as glue
- Writing your own ufunc
- Beyond the Basics
- NumPy Reference
- Array objects
- The N-dimensional array (
ndarray) - Scalars
- Data type objects (
dtype) - Indexing
- Iterating Over Arrays
- Standard array subclasses
- Masked arrays
- The
numpy.mamodule - Using numpy.ma
- Examples
- Constants of the
numpy.mamodule - The
MaskedArrayclass MaskedArraymethods- Masked array operations
- The
- The Array Interface
- Datetimes and Timedeltas
- The N-dimensional array (
- Universal functions (
ufunc) - Routines
- Array creation routines
- Array manipulation routines
- Binary operations
- String operations
- C-Types Foreign Function Interface (
numpy.ctypeslib) - Datetime Support Functions
- Data type routines
- Optionally Scipy-accelerated routines (
numpy.dual) - Mathematical functions with automatic domain (
numpy.emath) - Floating point error handling
- Discrete Fourier Transform (
numpy.fft) - Financial functions
- Functional programming
- Numpy-specific help functions
- Indexing routines
- Input and output
- Linear algebra (
numpy.linalg) - Logic functions
- Masked array operations
- Mathematical functions
- Matrix library (
numpy.matlib) - Miscellaneous routines
- Padding Arrays
- Polynomials
- Transition notice
- Polynomial Package
- Using the Convenience Classes
- Polynomial Module (
numpy.polynomial.polynomial) - Chebyshev Module (
numpy.polynomial.chebyshev) - Legendre Module (
numpy.polynomial.legendre) - Laguerre Module (
numpy.polynomial.laguerre) - Hermite Module, “Physicists’” (
numpy.polynomial.hermite) - HermiteE Module, “Probabilists’” (
numpy.polynomial.hermite_e)
- Poly1d
- Polynomial Package
- Transition notice
- Random sampling (
numpy.random) - Set routines
- Sorting, searching, and counting
- Statistics
- Test Support (
numpy.testing) - Window functions
- Packaging (
numpy.distutils) - Numpy C-API
- Python Types and C-Structures
- System configuration
- Data Type API
- Array API
- Array Iterator API
- UFunc API
- Generalized Universal Function API
- Numpy core libraries
- C API Deprecations
- Numpy internals
- Numpy and SWIG
- Acknowledgements
- Array objects
- F2PY Users Guide and Reference Manual
- Contributing to Numpy
- Working with NumPy source code
- Setting up and using your development environment
- NumPy governance
- Numpy Enhancement Proposals
- Release Notes
- NumPy 1.11.0 Release Notes
- Highlights
- Build System Changes
- Future Changes
- Compatibility notes
- New Features
- Improvements
np.gradientnow supports anaxisargumentnp.lexsortnow supports arrays with object data-typenp.ma.core.MaskedArraynow supports anorderargument- Memory and speed improvements for masked arrays
ndarray.tofilenow uses fallocate on linux- Optimizations for operations of the form
A.T @ AandA @ A.T np.testing.assert_warnscan now be used as a context manager- Speed improvement for np.random.shuffle
- Changes
- Deprecations
- FutureWarnings
- NumPy 1.10.4 Release Notes
- NumPy 1.10.3 Release Notes
- NumPy 1.10.2 Release Notes
- NumPy 1.10.1 Release Notes
- NumPy 1.10.0 Release Notes
- Highlights
- Dropped Support
- Future Changes
- Compatibility notes
- Default casting rule change
- numpy version string
- relaxed stride checking
- Concatenation of 1d arrays along any but
axis=0raisesIndexError - np.ravel, np.diagonal and np.diag now preserve subtypes
- rollaxis and swapaxes always return a view
- nonzero now returns base ndarrays
- C API
- recarray field return types
- recarray views
- ‘out’ keyword argument of ufuncs now accepts tuples of arrays
- byte-array indices now raises an IndexError
- Masked arrays containing objects with arrays
- Median warns and returns nan when invalid values are encountered
- Functions available from numpy.ma.testutils have changed
- New Features
- Reading extra flags from site.cfg
- np.cbrt to compute cube root for real floats
- numpy.distutils now allows parallel compilation
- genfromtxt has a new
max_rowsargument - New function np.broadcast_to for invoking array broadcasting
- New context manager clear_and_catch_warnings for testing warnings
- cov has new
fweightsandaweightsarguments - Support for the ‘@’ operator in Python 3.5+
- New argument
normto fft functions
- Improvements
- np.digitize using binary search
- np.poly now casts integer inputs to float
- np.interp can now be used with periodic functions
- np.pad supports more input types for
pad_widthandconstant_values - np.argmax and np.argmin now support an
outargument - More system C99 complex functions detected and used
- np.loadtxt support for the strings produced by the
float.hexmethod - np.isclose properly handles minimal values of integer dtypes
- np.allclose uses np.isclose internally.
- np.genfromtxt now handles large integers correctly
- np.load, np.save have pickle backward compatibility flags
- MaskedArray support for more complicated base classes
- Changes
- Deprecations
- NumPy 1.9.2 Release Notes
- NumPy 1.9.1 Release Notes
- NumPy 1.9.0 Release Notes
- Highlights
- Dropped Support
- Future Changes
- Compatibility notes
- The diagonal and diag functions return readonly views.
- Special scalar float values don’t cause upcast to double anymore
- Percentile output changes
- ndarray.tofile exception type
- Invalid fill value exceptions
- Polynomial Classes no longer derived from PolyBase
- Using numpy.random.binomial may change the RNG state vs. numpy < 1.9
- Random seed enforced to be a 32 bit unsigned integer
- Argmin and argmax out argument
- Einsum
- Indexing
- Non-integer reduction axis indexes are deprecated
promote_typesand string dtypecan_castand string dtype- astype and string dtype
- npyio.recfromcsv keyword arguments change
- The
doc/swigdirectory moved - The
npy_3kcompat.hheader changed - Negative indices in C-Api
sq_itemandsq_ass_itemsequence methods - NDIter
zeros_likefor string dtypes now returns empty strings
- New Features
- Percentile supports more interpolation options
- Generalized axis support for median and percentile
- Dtype parameter added to
np.linspaceandnp.logspace - More general
np.triuandnp.trilbroadcasting tobytesalias fortostringmethod- Build system
- Compatibility to python
numbersmodule increasingparameter added tonp.vanderunique_countsparameter added tonp.unique- Support for median and percentile in nanfunctions
- NumpyVersion class added
- Allow saving arrays with large number of named columns
- Full broadcasting support for
np.cross
- Improvements
- Better numerical stability for sum in some cases
- Percentile implemented in terms of
np.partition - Performance improvement for
np.array - Performance improvement for
np.searchsorted - Optional reduced verbosity for np.distutils
- Covariance check in
np.random.multivariate_normal - Polynomial Classes no longer template based
- More GIL releases
- MaskedArray support for more complicated base classes
- C-API
- Deprecations
- NumPy 1.8.2 Release Notes
- NumPy 1.8.1 Release Notes
- NumPy 1.8.0 Release Notes
- Highlights
- Dropped Support
- Future Changes
- Compatibility notes
- New Features
- Support for linear algebra on stacked arrays
- In place fancy indexing for ufuncs
- New functions partition and argpartition
- New functions nanmean, nanvar and nanstd
- New functions full and full_like
- IO compatibility with large files
- Building against OpenBLAS
- New constant
- New modes for qr
- New invert argument to in1d
- Advanced indexing using np.newaxis
- C-API
- runtests.py
- Improvements
- Changes
- Deprecations
- Authors
- NumPy 1.7.2 Release Notes
- NumPy 1.7.1 Release Notes
- NumPy 1.7.0 Release Notes
- Highlights
- Compatibility notes
- New features
- Reduction UFuncs Generalize axis= Parameter
- Reduction UFuncs New keepdims= Parameter
- Datetime support
- Custom formatter for printing arrays
- New function numpy.random.choice
- New function isclose
- Preliminary multi-dimensional support in the polynomial package
- Ability to pad rank-n arrays
- New argument to searchsorted
- Build system
- C API
- Changes
- Deprecations
- NumPy 1.6.2 Release Notes
- NumPy 1.6.1 Release Notes
- NumPy 1.6.0 Release Notes
- NumPy 1.5.0 Release Notes
- NumPy 1.4.0 Release Notes
- NumPy 1.3.0 Release Notes
- NumPy 1.11.0 Release Notes
- About NumPy
- About this documentation
- Reporting bugs
- Numpy License
- Glossary