File: magic_numpy.txt

package info (click to toggle)
python-hypothesis 6.148.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,728 kB
  • sloc: python: 64,147; ruby: 1,107; sh: 270; makefile: 43; javascript: 6
file content (20 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This test code was written by the `hypothesis.extra.ghostwriter` module
# and is provided under the Creative Commons Zero public domain dedication.

import numpy
import test_expected_output
from hypothesis import given, strategies as st
from hypothesis.extra.numpy import array_shapes, arrays
from numpy import dtype


@given(
    f=arrays(dtype=dtype("float64"), shape=array_shapes(max_dims=2)),
    fc=arrays(dtype=numpy.float64 | numpy.complex128, shape=array_shapes(max_dims=2)),
    union=st.one_of(
        st.none(),
        arrays(dtype=numpy.float64 | numpy.complex128, shape=array_shapes(max_dims=2)),
    ),
)
def test_fuzz_various_numpy_annotations(f, fc, union):
    test_expected_output.various_numpy_annotations(f=f, fc=fc, union=union)