File: magic_numpy.txt

package info (click to toggle)
python-hypothesis 6.130.5-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 14,884 kB
  • sloc: python: 59,532; ruby: 1,107; sh: 251; makefile: 45
file content (20 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
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)