Skip to main content

Adds support for generating datetime to Hypothesis

Project description

This adds support for numpy types to Hypothesis.

This should be considered more of a prototype than a serious piece of production software. Usage is as follows:

>>> from hypothesis import find
>>> from hypothesis.extra.numpy import arrays
>>> find(arrays(float, 2), lambda x: x.sum() >= 1)
array([ 1.,  0.])
>>> find(arrays(bool, (2, 2)), lambda x: x.any())
array([[False, False],
       [ True, False]], dtype=bool)
>>> find(arrays('uint64', (2, 2)), lambda x: x.any())
array([[1, 0],
       [0, 0]], dtype=uint64)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypothesis-numpy-0.6.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page