[Numpy-discussion] numpy 1.9b1 bug in pad function?
Stefan van der Walt
stefan at sun.ac.za
Sat Jun 14 08:55:14 EDT 2014
On 2014-06-14 14:40:29, Nadav Horesh <nadavh at visionsense.com> wrote:
> This is most likely a documentation error since:
>
> In [7]: np.pad(a)
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> <ipython-input-7-7a0346d77134> in <module>()
> ----> 1 np.pad(a)
>
> TypeError: pad() missing 1 required positional argument: 'pad_width'
That is because the signature is
pad(array, pad_width, mode=None, ...)
But mode *does* need to be specified. I see why this can be confusing,
though, so perhaps we should simply make mode a positional argument too.
Stéfan
More information about the NumPy-Discussion
mailing list