{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"}],"enrichment":{"capability":"Provides version-specific type annotations for NumPy code, allowing static type-checkers to understand which NumPy version is installed and apply appropriate type hints accordingly.","skillfed_tags":["numpy-typing","type-checking","version-compat"],"use_cases":["Library authors supporting multiple NumPy versions who need type-checkers to understand version-specific APIs without runtime overhead","Conditional type annotations for NumPy 2.0+ features like StringDType that weren't available in earlier versions","Handling NumPy 2.1+ generic type changes (ABCPolyBase) while maintaining backward compatibility with older versions","Type-safe use of NumPy 2.2+ bool scalar generics (LiteralTrue, LiteralFalse) across version boundaries"],"what_it_does":"numpy-typing-compat is a compatibility layer that lets you write NumPy type annotations that adapt to the installed NumPy version. It provides version-specific boolean constants (like NUMPY_GE_2_1) and type aliases (StringDType, ABCPolyBase, LiteralTrue, LiteralFalse) that static type-checkers can understand, similar to how you'd use sys.version_info for Python version checks. This is particularly useful for library authors who need to support multiple NumPy versions while maintaining accurate type hints.\n\nThe package is tightly coupled to NumPy versions\u2014each release targets a specific NumPy minor version range (e.g., 20260602.2.5 targets numpy >=2.4,<2.5). Modern package managers like uv and pixi automatically install the correct version, but pip users must manually ensure alignment. The package is actively maintained and designed as a helper for the optype library, though it can be used directly when you need fine-grained version-aware typing.","worth_installing":"Yes, if you are a library author supporting multiple NumPy versions and need static type-checkers to understand version-specific type differences. Use modern package managers (uv, pixi) to avoid manual version management. Not necessary for applications using a single NumPy version or if you rely on optype for higher-level typing utilities."},"id":"numpy-typing-compat","links":{"html":"https://skillfed.io/packages/numpy-typing-compat","md":"https://skillfed.io/packages/numpy-typing-compat.md","pypi":"https://pypi.org/project/numpy-typing-compat/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-02","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"numpy-typing-compat","python_support":"supports_current","summary":"Static typing compatibility layer for older versions of NumPy"},"popularity":{"monthly_downloads":3920133,"position":2452,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"20260602.2.5"}
