|
14 | 14 | # See the License for the specific language governing permissions and
|
15 | 15 | # limitations under the License.
|
16 | 16 |
|
17 |
| -import itertools |
18 |
| -import os |
19 |
| - |
20 | 17 | import numpy as np
|
21 | 18 | import pytest
|
22 | 19 | from numpy.testing import assert_allclose
|
@@ -185,46 +182,3 @@ def test_hyper_real_special_cases(np_call, dpt_call, dtype):
|
185 | 182 |
|
186 | 183 | tol = 8 * dpt.finfo(dtype).resolution
|
187 | 184 | assert_allclose(dpt.asnumpy(dpt_call(yf)), Y_np, atol=tol, rtol=tol)
|
188 |
| - |
189 |
| - |
190 |
| -@pytest.mark.parametrize("np_call, dpt_call", _all_funcs) |
191 |
| -@pytest.mark.parametrize("dtype", ["c8", "c16"]) |
192 |
| -def test_hyper_complex_special_cases_conj_property(np_call, dpt_call, dtype): |
193 |
| - q = get_queue_or_skip() |
194 |
| - skip_if_dtype_not_supported(dtype, q) |
195 |
| - |
196 |
| - x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0] |
197 |
| - xc = [complex(*val) for val in itertools.product(x, repeat=2)] |
198 |
| - |
199 |
| - Xc_np = np.array(xc, dtype=dtype) |
200 |
| - Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q) |
201 |
| - |
202 |
| - tol = 50 * dpt.finfo(dtype).resolution |
203 |
| - Y = dpt_call(Xc) |
204 |
| - Yc = dpt_call(dpt.conj(Xc)) |
205 |
| - |
206 |
| - dpt.allclose(Y, dpt.conj(Yc), atol=tol, rtol=tol) |
207 |
| - |
208 |
| - |
209 |
| -@pytest.mark.skipif( |
210 |
| - os.name != "posix", reason="Known to fail on Windows due to bug in NumPy" |
211 |
| -) |
212 |
| -@pytest.mark.parametrize("np_call, dpt_call", _all_funcs) |
213 |
| -@pytest.mark.parametrize("dtype", ["c8", "c16"]) |
214 |
| -def test_hyper_complex_special_cases(np_call, dpt_call, dtype): |
215 |
| - q = get_queue_or_skip() |
216 |
| - skip_if_dtype_not_supported(dtype, q) |
217 |
| - |
218 |
| - x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0] |
219 |
| - xc = [complex(*val) for val in itertools.product(x, repeat=2)] |
220 |
| - |
221 |
| - Xc_np = np.array(xc, dtype=dtype) |
222 |
| - Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q) |
223 |
| - |
224 |
| - with np.errstate(all="ignore"): |
225 |
| - Ynp = np_call(Xc_np) |
226 |
| - |
227 |
| - tol = 50 * dpt.finfo(dtype).resolution |
228 |
| - Y = dpt_call(Xc) |
229 |
| - assert_allclose(dpt.asnumpy(dpt.real(Y)), np.real(Ynp), atol=tol, rtol=tol) |
230 |
| - assert_allclose(dpt.asnumpy(dpt.imag(Y)), np.imag(Ynp), atol=tol, rtol=tol) |
0 commit comments