Skip to content

Commit

Permalink
Limit width of complex data type when using underlying generator to s…
Browse files Browse the repository at this point in the history
…upport complex256 dtype
  • Loading branch information
felixdivo committed Feb 4, 2023
1 parent 7fd22b9 commit 2b04181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/extra/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def compat_kw(*args, **kw):
)
elif dtype.kind == "c":
result = st.complex_numbers(
width=8 * dtype.itemsize, # convert from bytes to bits
width=min(8 * dtype.itemsize, 128), # convert from bytes to bits
**compat_kw(
"min_magnitude",
"max_magnitude",
Expand Down

0 comments on commit 2b04181

Please sign in to comment.