Skip to content

Commit 586e2b6

Browse files
author
Vahid Tavanashad
committed
update ldexp dtypes
1 parent 77ef1a5 commit 586e2b6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

mkl_umath/tests/test_basic.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import pytest
2727
import numpy as np
2828
import mkl_umath._ufuncs as mu
29+
import mkl_umath._patch as mp
2930

3031
np.random.seed(42)
3132

@@ -57,6 +58,7 @@ def get_args(args_str):
5758
types = mkl_umath.types
5859
for type_ in types:
5960
args_str = type_[:type_.find('->')]
61+
print(mkl_umath)
6062
args = get_args(args_str)
6163
generated_cases[(umath, type_)] = args
6264

@@ -82,6 +84,10 @@ def test_umath(case):
8284

8385
assert np.allclose(mkl_res, np_res), f"Results for '{umath}': mkl_res: {mkl_res}, np_res: {np_res}"
8486

85-
def test_cases_count():
86-
print("Test cases count:", len(test_cases))
87-
assert len(test_cases) > 0, "No test cases found"
87+
def test_patch():
88+
assert not mp.is_patched()
89+
mp.use_in_numpy() # Enable mkl_umath in Numpy
90+
assert mp.is_patched()
91+
92+
mp.restore() # Disable mkl_umath in Numpy
93+
assert not mp.is_patched()

0 commit comments

Comments
 (0)