AndreaCensi / contracts

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.
http://andreacensi.github.io/contracts/
Other
398 stars 62 forks source link

Try to import numpy only once, numpy is None if fails #25

Closed yuvallanger closed 9 years ago

yuvallanger commented 9 years ago

I've asked on irc://irc.freenode.net/python. The user nicknamed "The-Compiler" had suggested this approach.

AndreaCensi commented 9 years ago

Thanks, I just implemented this directly.