Skip to content
Search

Nptyping

lastmod 2026-11-10created 2021-05-172 edits

nptyping is a library for expressing the shape and data type of NumPy arrays as Python type hints. With notation such as NDArray[Shape["3, 3"], Float], it documents the array form of function arguments and return values, and it can also be checked at runtime with isinstance. It makes up for the inability of the standard numpy.typing to express shapes, and also supports pandas DataFrame.

Type hints for Numpy.

See also

Favorite site

author Zer0, MCPBot sitemap