contourpy
Python library for calculating contours of 2D quadrilateral grids
Decision gist · record as of 2026-08-14
Yes. ContourPy is actively maintained, permissively licensed, has no known vulnerabilities, and solves a specific problem (2D contouring) that many scientific and visualization libraries need. Install friction is moderate but manageable via pre-built wheels. Use it if you need contours without Matplotlib overhead or if you want algorithm choice and multithreading support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy; C++ extension compilation may fail on platforms without pre-built wheels or if build tools are missing.
- Medium install friction due to compiled C++ extensions, but pre-built wheels cover common platforms (macOS, Linux, Windows) and Python versions 3.11–3.14.
- Repository is actively maintained with recent commits and no archived status.
License · maintenance · safety
permissive license (permissive) — BSD 3-Clause permissive license allows use in commercial and open-source projects with minimal restrictions; you must retain copyright notice and disclaimer.
last release 2025-07-26 (384 days) · last repo commit 2026-08-07 · 112 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 191,236,325 downloads/mo, #216 on PyPI
Alternatives
Verify before relying
import numpy as np
from contourpy import ContourGenerator
X, Y, Z = np.array([...]), np.array([...]), np.array([...])
contour_gen = ContourGenerator(X, Y, Z)
contours = contour_gen.lines(5.0)- Specific performance characteristics (speed, memory) compared to alternatives.
- Whether the 2005 and 2014 algorithms match historical implementations exactly.
- Multithreading behavior and thread-safety guarantees for concurrent use.
- Detailed API surface and available contour methods beyond lines().
What it is and what it does
ContourPy is a Python library that computes contour lines from 2D gridded data (quadrilateral grids). It wraps C++11 implementations of contouring algorithms, including the 2005 and 2014 versions, plus a newer algorithm available in both serial and multithreaded modes. The library is designed to let other Python packages use contouring without pulling in Matplotlib as a dependency.
You pass it gridded X, Y, and Z arrays and request contours at specific levels; it returns the contour line geometry. The main runtime dependency is numpy. It supports Python 3.11 and later, with pre-built wheels for macOS, Linux, and Windows, making installation straightforward on standard platforms.
Use it for
- Generate contour lines from scientific simulation or measurement data for visualization or analysis.
- Build a plotting library that needs contouring without depending on Matplotlib.
- Compute contours in batch or real-time applications where multithreaded performance is needed.
- Extract contour geometry for GIS, meteorology, or engineering workflows.
- Prototype or validate contouring algorithms using different implementations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ContourPy is actively maintained, permissively licensed, has no known vulnerabilities, and solves a specific problem (2D contouring) that many scientific and visualization libraries need. Install friction is moderate but manageable via pre-built wheels. Use it if you need contours without Matplotlib overhead or if you want algorithm choice and multithreading support.
Install
contourpy on PyPI
Before you install
Medium install friction due to compiled C++ extensions, but pre-built wheels cover common platforms (macOS, Linux, Windows) and Python versions 3.11–3.14. Repository is actively maintained with recent commits and no archived status.
Requires numpy; C++ extension compilation may fail on platforms without pre-built wheels or if build tools are missing.
License in practice
BSD 3-Clause permissive license allows use in commercial and open-source projects with minimal restrictions; you must retain copyright notice and disclaimer.
Quickstart
import numpy as np
from contourpy import ContourGenerator
X, Y, Z = np.array([...]), np.array([...]), np.array([...])
contour_gen = ContourGenerator(X, Y, Z)
contours = contour_gen.lines(5.0)
Verify before relying
- Specific performance characteristics (speed, memory) compared to alternatives.
- Whether the 2005 and 2014 algorithms match historical implementations exactly.
- Multithreading behavior and thread-safety guarantees for concurrent use.
- Detailed API surface and available contour methods beyond lines().
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 384 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 191,236,325 / month, #216 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: Visualization |
Evidence: contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl; contourpy-1.3.3-cp311-cp311-macosx_11_0_arm64.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; contourpy-1.3.3-cp311-cp311-musllinux_1_2_aarch64.whl; contourpy-1.3.3-cp311-cp311-musllinux_1_2_x86_64.whl; contourpy-1.3.3-cp311-cp311-win32.whl; contourpy-1.3.3-cp311-cp311-win_amd64.whl; contourpy-1.3.3-cp311-cp311-win_arm64.whl; contourpy-1.3.3-cp312-cp312-macosx_10_13_x86_64.whl; contourpy-1.3.3-cp312-cp312-macosx_11_0_arm64.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; contourpy-1.3.3-cp312-cp312-musllinux_1_2_aarch64.whl; contourpy-1.3.3-cp312-cp312-musllinux_1_2_x86_64.whl; contourpy-1.3.3-cp312-cp312-win32.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “contour calculation 2D grids”
- contourpyContourPy calculates contours of 2D quadrilateral grids using C++11…
- isosurfacesConstructs isolines and isosurfaces of 2D and 3D scalar fields…
- anastructAnalyzes 2D frames and trusses to compute bending moments, shear…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
Snowflake SQLAlchemy is a SQLAlchemy dialect that enables SQLAlchemy applications to connect to and query Snowflake databases using standard SQLAlchemy ORM and Core APIs.
Install it if you are building a Python application that needs to connect to Snowflake and prefer SQLAlchemy's abstraction layer over raw SQL or the connector API.
See also isosurfaces · cellpylib · python-motion-planning · mapbox-earcut · imutils · Box2D · colorcet · scikit-image · cycler · vispy