MCPcopy
hub / github.com/numpy/numpy / test_unary_PyUFunc

Method test_unary_PyUFunc

numpy/_core/tests/test_ufunc.py:117–121  ·  view source on GitHub ↗
(self, input_dtype, output_dtype, f=np.exp, x=0, y=1)

Source from the content-addressed store, hash-verified

115
116 @pytest.mark.parametrize('input_dtype,output_dtype', np_dtypes)
117 def test_unary_PyUFunc(self, input_dtype, output_dtype, f=np.exp, x=0, y=1):
118 xs = np.full(10, input_dtype(x), dtype=output_dtype)
119 ys = f(xs)[::2]
120 assert_allclose(ys, y)
121 assert_equal(ys.dtype, output_dtype)
122
123 def f2(x, y):
124 return x**y

Callers

nothing calls this directly

Calls 3

assert_allcloseFunction · 0.90
assert_equalFunction · 0.90
fFunction · 0.70

Tested by

no test coverage detected