> I like the strings, maybe that is not the best, but yes I would like to defer > that discussion. Having the string representation does allow 'pad()' to make > some checks on inputs to the built in functions. > > About whether to have "pad('mean', a, 5)" or "pad(a, 'mean', 5)" - I don't > care. It seems like we have two votes for the later form (Travis and > Nathaniel) and unless others weigh in, I will make the change soonish. > > > I think the suggestion is pad(a, 5, mode='mean'), which would be consistent > with common numpy signatures. The mode keyword should probably have a > default, something commonly used. I'd suggest 'mean', Nathaniel suggests > 'zero', I think either would be fine.
It looks like most agree that pad(a, 5, mode='mean') is the preferred API. In terms of the default, it really depends on the problem as to which one is most sensible. I notice that mode='edge' does not require additional keyword arguments and so perhaps this is the best default. But, I think Tim should make the call on which default he prefers. -Travis > > Chuck > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion