NumPy license#
NumPy’s source code and documentation are licensed under the
BSD 3-Clause License
(SPDX identifier BSD-3-Clause). This is a permissive license: you may use,
modify, and redistribute NumPy, in source or binary form and for any purpose
including commercial use, as long as you retain the copyright notice, the
list of conditions, and the disclaimer below.
The full text of the license is reproduced at the bottom of this page, and is
also available as the LICENSE.txt file in the
NumPy repository.
Vendored components#
The NumPy source tree includes a small number of third-party components that
are maintained by other projects and have their own licenses. All of these
are permissive licenses compatible with BSD-3-Clause. They include MIT, 0BSD,
CC0-1.0, and the dual Apache-2.0 / BSD-3-Clause license of Google Highway.
The license file for each vendored component is kept alongside its source in
the repository, and the complete list is recorded under license-files in
pyproject.toml.
These files are installed with NumPy so that the terms travel with the code.
Binary wheels on PyPI#
The pre-built wheels that NumPy publishes on PyPI are convenient to install because they bundle the compiled libraries NumPy depends on at runtime. Those bundled libraries are not covered by NumPy’s BSD-3-Clause license; they come with their own terms, which are included in the wheel:
libopenblas(OpenBLAS):BSD-3-Clause AND BSD-3-Clause-Attributionlibgfortran(GNU Fortran runtime):GPL-3.0-with-GCC-exceptionlibquadmath(GCC quad-precision math):LGPL-2.1-or-later
Exactly which of these libraries are bundled depends on the platform. See the license comments in pyproject.toml for the current list.
In practice, the GCC runtime exception and the LGPL permit linking these libraries into a BSD-licensed program, which is why NumPy can ship them. If your use case requires that every binary you redistribute is BSD-licensed, you can avoid the bundled libraries entirely by building NumPy from source against your own BLAS/LAPACK installation (see Building from source), or by installing NumPy from a distribution channel such as conda-forge, where these libraries are provided as separate packages.
License text#
Copyright (c) 2005-2025, NumPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the NumPy Developers nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.