Skip to content

Commit 8b4f079

Browse files
committed
remove complex special case tests for trig elementwise funcs
1 parent cf7ec47 commit 8b4f079

File tree

2 files changed

+0
-93
lines changed

2 files changed

+0
-93
lines changed

dpctl/tests/elementwise/test_hyperbolic.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import itertools
18-
import os
19-
2017
import numpy as np
2118
import pytest
2219
from numpy.testing import assert_allclose
@@ -185,46 +182,3 @@ def test_hyper_real_special_cases(np_call, dpt_call, dtype):
185182

186183
tol = 8 * dpt.finfo(dtype).resolution
187184
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)

dpctl/tests/elementwise/test_trigonometric.py

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import itertools
18-
import os
19-
2017
import numpy as np
2118
import pytest
2219
from numpy.testing import assert_allclose
@@ -216,47 +213,3 @@ def test_trig_real_special_cases(np_call, dpt_call, dtype):
216213
tol = 8 * dpt.finfo(dtype).resolution
217214
Y = dpt_call(yf)
218215
assert_allclose(dpt.asnumpy(Y), Y_np, atol=tol, rtol=tol)
219-
220-
221-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
222-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
223-
def test_trig_complex_special_cases_conj_property(np_call, dpt_call, dtype):
224-
q = get_queue_or_skip()
225-
skip_if_dtype_not_supported(dtype, q)
226-
227-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
228-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
229-
230-
Xc_np = np.array(xc, dtype=dtype)
231-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
232-
233-
tol = 50 * dpt.finfo(dtype).resolution
234-
Y = dpt_call(Xc)
235-
Yc = dpt_call(dpt.conj(Xc))
236-
237-
dpt.allclose(Y, dpt.conj(Yc), atol=tol, rtol=tol)
238-
239-
240-
@pytest.mark.skipif(
241-
os.name != "posix", reason="Known to fail on Windows due to bug in NumPy"
242-
)
243-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
244-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
245-
def test_trig_complex_special_cases(np_call, dpt_call, dtype):
246-
247-
q = get_queue_or_skip()
248-
skip_if_dtype_not_supported(dtype, q)
249-
250-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
251-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
252-
253-
Xc_np = np.array(xc, dtype=dtype)
254-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
255-
256-
with np.errstate(all="ignore"):
257-
Ynp = np_call(Xc_np)
258-
259-
tol = 50 * dpt.finfo(dtype).resolution
260-
Y = dpt_call(Xc)
261-
assert_allclose(dpt.asnumpy(dpt.real(Y)), np.real(Ynp), atol=tol, rtol=tol)
262-
assert_allclose(dpt.asnumpy(dpt.imag(Y)), np.imag(Ynp), atol=tol, rtol=tol)

0 commit comments

Comments
 (0)