MCPcopy Create free account
hub / github.com/numpy/numpy / test_unary_PyUFunc

Method test_unary_PyUFunc

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

Source from the content-addressed store, hash-verified

104
105 @pytest.mark.parametrize('input_dtype,output_dtype', np_dtypes)
106 def test_unary_PyUFunc(self, input_dtype, output_dtype, f=np.exp, x=0, y=1):
107 xs = np.full(10, input_dtype(x), dtype=output_dtype)
108 ys = f(xs)[::2]
109 assert_allclose(ys, y)
110 assert_equal(ys.dtype, output_dtype)
111
112 def f2(x, y):
113 return x**y

Callers

nothing calls this directly

Calls 3

assert_allcloseFunction · 0.90
assert_equalFunction · 0.90
fFunction · 0.85

Tested by

no test coverage detected