[Numpy-discussion] Style for pad implementation in 'pad' namespace or functions under np.lib

Tim Cera tim@cerazone....
Thu Mar 29 09:55:20 CDT 2012


On Wed, Mar 28, 2012 at 6:08 PM, Charles R Harris <charlesr.harris@gmail.com
> wrote:

>
> I think there is also a question of using a prefix pad_xxx for the
> function names as opposed to pad.xxx.
>

If I had it as pad.mean, pad.median, ...etc. then someone could

    from numpy.pad import *
    a = np.arange(5)
    # then you would have a confusing
    b = mean(a, 2)

Because of that I would vote for 'pad.pad_xxx' instead of 'pad.xxx'.  In
fact at one time I named the functions 'pad.pad_with_xxx' which was a
little overkill.

Kindest regards,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120329/09436966/attachment.html 


More information about the NumPy-Discussion mailing list