[Numpy-discussion] minor improvment to ones

Sturla Molden sturla at molden.no
Fri Jan 30 09:11:03 EST 2009


On 1/30/2009 2:18 PM, Neal Becker wrote:
> A nit, but it would be nice if 'ones' could fill with a value other than 1.
> 
> Maybe an optional val= keyword?
> 

I am -1 on this. Ones should fill with ones, zeros should fill with 
zeros. Anything else is counter-intuitive. Calling numpy.ones to fill 
with fives makes no sense to me. But I would be +1 on having a function 
called numpy.values or numpy.fill that would create and fill an ndarray 
with arbitrary values.


S.M.



More information about the NumPy-Discussion mailing list