()
| 10926 | |
| 10927 | |
| 10928 | def test_npymath_real(): |
| 10929 | # Smoketest npymath functions |
| 10930 | from numpy._core._multiarray_tests import ( |
| 10931 | npy_cosh, |
| 10932 | npy_log10, |
| 10933 | npy_sinh, |
| 10934 | npy_tan, |
| 10935 | npy_tanh, |
| 10936 | ) |
| 10937 | |
| 10938 | funcs = {npy_log10: np.log10, |
| 10939 | npy_cosh: np.cosh, |
| 10940 | npy_sinh: np.sinh, |
| 10941 | npy_tan: np.tan, |
| 10942 | npy_tanh: np.tanh} |
| 10943 | vals = (1, np.inf, -np.inf, np.nan) |
| 10944 | types = (np.float32, np.float64, np.longdouble) |
| 10945 | |
| 10946 | with np.errstate(all='ignore'): |
| 10947 | for fun, npfun in funcs.items(): |
| 10948 | for x, t in itertools.product(vals, types): |
| 10949 | z = t(x) |
| 10950 | got = fun(z) |
| 10951 | expected = npfun(z) |
| 10952 | assert_allclose(got, expected) |
| 10953 | |
| 10954 | def test_uintalignment_and_alignment(): |
| 10955 | # alignment code needs to satisfy these requirements: |
nothing calls this directly
no test coverage detected
searching dependent graphs…