We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0a7bf2 commit bef0ea3Copy full SHA for bef0ea3
array_api_tests/hypothesis_helpers.py
@@ -186,11 +186,11 @@ def oneway_broadcastable_shapes(draw) -> OnewayBroadcastableShapes:
186
real_floating_dtypes = sampled_from(dh.real_float_dtypes)
187
numeric_dtypes = sampled_from(dh.numeric_dtypes)
188
# Note: this always returns complex dtypes, even if api_version < 2022.12
189
-complex_dtypes = sampled_from(dh.complex_dtypes)
+complex_dtypes: SearchStrategy[Any] | None = sampled_from(dh.complex_dtypes) if dh.complex_dtypes else None
190
191
def all_floating_dtypes() -> SearchStrategy[DataType]:
192
strat = floating_dtypes
193
- if api_version >= "2022.12":
+ if api_version >= "2022.12" and complex_dtypes is not None:
194
strat |= complex_dtypes
195
return strat
196
0 commit comments