skillfed

data-science-types

Type stubs for Python machine learning libraries

data-science-types v0.2.23 181.0K downloads/30d#10,135 on PyPI206
Permissive license Apache License 2.0 Abandoned released

What it is and what it does

This is a stub-only package that teaches mypy, pytype, and PyCharm how to type-check code using NumPy, pandas, and Matplotlib. It does not add runtime behavior—it only provides type information for static analysis. The stubs are PEP-561 compliant, meaning type checkers will automatically recognize them when the package is installed.

The package is explicitly a work in progress and incomplete. Many functions lack type annotations in the stubs. As a result, you may encounter type checker errors claiming functions do not exist when they actually do. The project was archived and has not been maintained since 2021-02-16, so new library features and API changes are not reflected in the stubs.

Use it for:

  • Catch type errors in array operations before runtime, such as incorrect dtype assignments or incompatible arithmetic.
  • Enable IDE autocompletion and type hints for data structures in editors like PyCharm.
  • Validate plotting code with type checking to catch incorrect argument types to functions.
  • Add static type safety to data science scripts without waiting for upstream libraries to ship their own stubs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides PEP-561-compliant type stubs for NumPy, pandas, and Matplotlib, enabling mypy and other type checkers to recognize and validate types in these libraries.

No. The package is abandoned and has not been maintained since 2021-02-16. While it has no runtime dependencies and installs easily, its incomplete stub coverage combined with lack of maintenance means it will produce false negatives and false positives. Modern versions of the supported libraries have either shipped their own stubs or improved type support, making this package obsolete for current projects.

Install

data-science-types on PyPI

pip

pip install data-science-types

uv

uv add data-science-types

poetry

poetry add data-science-types

Installing data-science-types

Before you install

Installation is frictionless with no runtime dependencies. However, the package is abandoned and has not been maintained since 2021-02-16, which means type coverage gaps will persist and newer library versions may lack stub support.

License in practice

Licensed under Apache License 2.0 (permissive), so you can use it freely in commercial and open-source projects without restriction.

Quickstart

pip install data-science-types

# Then type checkers will recognize types in the supported libraries
# Example from the package documentation:
arr1: np.ndarray[np.int64] = np.array([3, 7, 39, -3])  # OK
arr2: np.ndarray[np.int32] = np.array([3, 7, 39, -3])  # Type error

Requires Python 3.6 or later. Type coverage is incomplete; many functions lack stubs, so type checkers may report false 'function does not exist' errors.

Verify before relying

  • Current compatibility with recent versions of NumPy, pandas, and Matplotlib given the last release was 2021-02-16
  • Whether stub coverage has improved or regressed relative to upstream library API changes since abandonment
  • How much of NumPy and pandas functionality is actually covered by the stubs

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,005 days since the last release
Last repo commit (repository archived)
First released
Downloads 180,978/month — #10,135 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: data_science_types-0.2.23-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Typed

Tags

mypy type stubs numpy pandastype hints for data science librariespep 561 type stubsstatic type checking data sciencematplotlib type annotations
type-stubsabandoned

More Quality Assurance packages