We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
xps.complex_dtypes()
2012.12
1 parent 6998b01 commit dc2d4b9Copy full SHA for dc2d4b9
array_api_tests/test_fft.py
@@ -1,12 +1,14 @@
1
import math
2
from typing import List, Optional
3
+from unittest.mock import MagicMock
4
5
import pytest
6
from hypothesis import assume, given
7
from hypothesis import strategies as st
8
9
from array_api_tests.typing import Array, DataType
10
11
+from . import api_version
12
from . import dtype_helpers as dh
13
from . import hypothesis_helpers as hh
14
from . import pytest_helpers as ph
@@ -21,6 +23,11 @@
21
23
]
22
24
25
26
+# Using xps.complex_dtypes() raises an AttributeError for 2021.12 instances of
27
+# xps, hence this hack. TODO: figure out a better way to manage this!
28
+if api_version < "2022.12":
29
+ xps = MagicMock(xps)
30
+
31
fft_shapes_strat = hh.shapes(min_dims=1).filter(lambda s: math.prod(s) > 1)
32
33
0 commit comments