[Numpy-discussion] minor improvment to ones

Ryan May rmay31@gmail....
Fri Jan 30 09:19:14 CST 2009

Sturla Molden wrote:
> 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.

I completely agree here.


Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

More information about the Numpy-discussion mailing list