def METHOD_NAME(self, func_name):
    expected_exc = ValueError
    x = [np.inf, -np.inf, np.nan, 0]
    res_shape = (3,)
    res_np = np.empty(res_shape)
    res_num = num.empty(res_shape)
    func_np = getattr(np, func_name)
    func_num = getattr(num, func_name)
    with pytest.raises(expected_exc):
        func_np(x, out=res_np)
    with pytest.raises(expected_exc):
        func_num(x, out=res_num)