Skip to content

Commit de8c3ee

Browse files
committed
remove complex special case tests for trig elementwise funcs
1 parent 0a7c95a commit de8c3ee

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
@@ -189,46 +186,3 @@ def test_hyper_real_special_cases(np_call, dpt_call, dtype):
189186

190187
tol = 8 * dpt.finfo(dtype).resolution
191188
assert_allclose(dpt.asnumpy(dpt_call(yf)), Y_np, atol=tol, rtol=tol)
192-
193-
194-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
195-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
196-
def test_hyper_complex_special_cases_conj_property(np_call, dpt_call, dtype):
197-
q = get_queue_or_skip()
198-
skip_if_dtype_not_supported(dtype, q)
199-
200-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
201-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
202-
203-
Xc_np = np.array(xc, dtype=dtype)
204-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
205-
206-
tol = 50 * dpt.finfo(dtype).resolution
207-
Y = dpt_call(Xc)
208-
Yc = dpt_call(dpt.conj(Xc))
209-
210-
dpt.allclose(Y, dpt.conj(Yc), atol=tol, rtol=tol)
211-
212-
213-
@pytest.mark.skipif(
214-
os.name != "posix", reason="Known to fail on Windows due to bug in NumPy"
215-
)
216-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
217-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
218-
def test_hyper_complex_special_cases(np_call, dpt_call, dtype):
219-
q = get_queue_or_skip()
220-
skip_if_dtype_not_supported(dtype, q)
221-
222-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
223-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
224-
225-
Xc_np = np.array(xc, dtype=dtype)
226-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
227-
228-
with np.errstate(all="ignore"):
229-
Ynp = np_call(Xc_np)
230-
231-
tol = 50 * dpt.finfo(dtype).resolution
232-
Y = dpt_call(Xc)
233-
assert_allclose(dpt.asnumpy(dpt.real(Y)), np.real(Ynp), atol=tol, rtol=tol)
234-
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
@@ -218,47 +215,3 @@ def test_trig_real_special_cases(np_call, dpt_call, dtype):
218215
tol = 8 * dpt.finfo(dtype).resolution
219216
Y = dpt_call(yf)
220217
assert_allclose(dpt.asnumpy(Y), Y_np, atol=tol, rtol=tol)
221-
222-
223-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
224-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
225-
def test_trig_complex_special_cases_conj_property(np_call, dpt_call, dtype):
226-
q = get_queue_or_skip()
227-
skip_if_dtype_not_supported(dtype, q)
228-
229-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
230-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
231-
232-
Xc_np = np.array(xc, dtype=dtype)
233-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
234-
235-
tol = 50 * dpt.finfo(dtype).resolution
236-
Y = dpt_call(Xc)
237-
Yc = dpt_call(dpt.conj(Xc))
238-
239-
dpt.allclose(Y, dpt.conj(Yc), atol=tol, rtol=tol)
240-
241-
242-
@pytest.mark.skipif(
243-
os.name != "posix", reason="Known to fail on Windows due to bug in NumPy"
244-
)
245-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
246-
@pytest.mark.parametrize("dtype", ["c8", "c16"])
247-
def test_trig_complex_special_cases(np_call, dpt_call, dtype):
248-
249-
q = get_queue_or_skip()
250-
skip_if_dtype_not_supported(dtype, q)
251-
252-
x = [np.nan, np.inf, -np.inf, +0.0, -0.0, +1.0, -1.0]
253-
xc = [complex(*val) for val in itertools.product(x, repeat=2)]
254-
255-
Xc_np = np.array(xc, dtype=dtype)
256-
Xc = dpt.asarray(Xc_np, dtype=dtype, sycl_queue=q)
257-
258-
with np.errstate(all="ignore"):
259-
Ynp = np_call(Xc_np)
260-
261-
tol = 50 * dpt.finfo(dtype).resolution
262-
Y = dpt_call(Xc)
263-
assert_allclose(dpt.asnumpy(dpt.real(Y)), np.real(Ynp), atol=tol, rtol=tol)
264-
assert_allclose(dpt.asnumpy(dpt.imag(Y)), np.imag(Ynp), atol=tol, rtol=tol)

0 commit comments

Comments
 (0)