On Mon, Jan 14, 2013 at 2:57 PM, Benjamin Root <ben.r...@ou.edu> wrote: > I am also +1 on the idea of having a filled() and filled_like() function (I > learned a long time ago to just do a = np.empty() and a.fill() rather than > the multiplication trick I learned from Matlab). However, the collision > with the masked array API is a non-starter for me. np.const() and > np.const_like() probably make the most sense, but I would prefer a verb over > a noun.
To get an array of 1's, you call np.ones(shape), to get an array of 0's you call np.zeros(shape) so to get an array of val's why not call np.vals(shape, val)? Cheers Robins _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion