PyContracts is a Python package that allows to declare constraints on function parameters and return values. Contracts can be specified using Python3 annotations, or inside a docstring. PyContracts supports a basic type system, variables binding, arithmetic constraints, and has several specialized contracts and an extension API.
Very small change to allow number-like contracts (e.g. '=3,>0|<=0') with instances of numpy.number (numpy.int64, numpy.float64, numpy.uint8, etc...).