def METHOD_NAME(size, out_dt):
    arr_np = np.random.randint(-5, 5, size=size)
    arr_num = num.array(arr_np)
    ndim = arr_np.ndim
    for axis in (-1, ndim - 1, None):
        out_shape = gen_out_shape(size, axis)
        out_np = np.empty(out_shape, dtype=out_dt)
        out_num = num.empty(out_shape, dtype=out_dt)
        np.mean(arr_np, axis=axis, out=out_np)
        num.mean(arr_num, axis=axis, out=out_num)
        np.array_equal(out_np, out_num)