> On Sun, Jan 13, 2013 at 11:24 PM, Robert Kern <robert.k...@gmail.com> wrote: >> One alternative that does not expand the API with two-liners is to let >> the ndarray.fill() method return self: >> >> a = np.empty(...).fill(20.0) >
On 1/13/2013 6:39 PM, Nathaniel Smith wrote: > This violates the convention that in-place operations never return > self, to avoid confusion with out-of-place operations. Strongly agree. It is not worth a violation to save two keystrokes: "\na". (Three or four for a longer name, given name completion.) Alan Isaac _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion