nptyping
Type hints for NumPy.
Decision gist · record as of 2026-08-14
Yes, if you need type hints for NumPy or pandas and are comfortable with a dormant package. The low install friction and permissive license make it easy to adopt. However, verify that it works with your current NumPy and pandas versions, and be aware that no active maintenance means bugs or incompatibilities with future releases will not be fixed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later and numpy installed.
- Low install friction with only two runtime dependencies (typing-extensions and numpy).
- Maintenance is dormant—last release was 2023-02-20 and no commits since 2024-08-01—so expect no active bug fixes or feature updates.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
last release 2023-02-20 (1271 days) · last repo commit 2024-08-01 · 638 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 285,526 downloads/mo, #8,054 on PyPI
Alternatives
Verify before relying
pip install nptyping
from nptyping import NDArray, Shape, Int
import numpy as np
arr: NDArray[Shape["2, 2"], Int] = np.array([[1, 2], [3, 4]])
print(isinstance(arr, NDArray[Shape["2, 2"], Int]))- Whether runtime type checking performance is acceptable for large arrays or frequent checks in production code.
- Current compatibility with recent numpy and pandas versions beyond what the fact sheet confirms.
What it is and what it does
nptyping adds type-hint support for NumPy arrays and pandas DataFrames, letting you annotate array shape, dtype, and structure in your code. It works with standard Python type hints (e.g., `NDArray[Shape["2, 2"], Int]`) so type checkers like MyPy can validate your code statically. Beyond static checking, it also provides runtime validation through `isinstance()` checks and an `assert_isinstance()` helper, so you can verify that actual arrays match their declared types at runtime—catching shape mismatches, dtype errors, or structural inconsistencies.
The package handles NumPy's structured arrays, record arrays, and pandas DataFrames with a concise syntax. It depends only on typing-extensions and numpy, making it lightweight to add to existing projects. However, maintenance is dormant (last release February 2023), so it receives no active updates or bug fixes.
Use it for
- Add type hints to NumPy array function signatures so IDEs and MyPy can catch shape/dtype mismatches before runtime.
- Validate that incoming arrays match expected structure (shape, dtype, field names) using runtime isinstance checks.
- Document the expected structure of pandas DataFrames in function signatures for better code clarity.
- Catch accidental type errors in numerical computing pipelines by asserting array properties at key points.
- Express complex structured arrays (with named fields and nested shapes) in a readable, type-checkable form.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need type hints for NumPy or pandas and are comfortable with a dormant package.
The low install friction and permissive license make it easy to adopt. However, verify that it works with your current NumPy and pandas versions, and be aware that no active maintenance means bugs or incompatibilities with future releases will not be fixed.
Install
nptyping on PyPI
Before you install
Low install friction with only two runtime dependencies (typing-extensions and numpy). Maintenance is dormant—last release was 2023-02-20 and no commits since 2024-08-01—so expect no active bug fixes or feature updates.
Requires Python 3.7 or later and numpy installed.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install nptyping
from nptyping import NDArray, Shape, Int
import numpy as np
arr: NDArray[Shape["2, 2"], Int] = np.array([[1, 2], [3, 4]])
print(isinstance(arr, NDArray[Shape["2, 2"], Int]))
Verify before relying
- Whether runtime type checking performance is acceptable for large arrays or frequent checks in production code.
- Current compatibility with recent numpy and pandas versions beyond what the fact sheet confirms.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestyping-extensionsnumpy |
| Maintenance | Dormant 1,271 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 285,526 / month, #8,054 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: nptyping-2.5.0-py3-none-any.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 › “numpy array type hints”
- nptypingProvides type hints and runtime type checking for NumPy arrays and…
- numpydanticNumpydantic adds type annotations and validation for arrays with…
- jaxtypingProvides type annotations and runtime type-checking for array shape…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also data-science-types · numpydantic · lovely-numpy · typing-validation · jupyter-mimetypes · jaxtyping · visions · numerary · npTDMS · awkward-pandas