[Numpy-discussion] isn't it a bug in array.fill()?
Keith Goodman
kwgoodman at gmail.com
Fri Aug 29 13:27:51 EDT 2008
On Fri, Aug 29, 2008 at 10:19 AM, dmitrey <dmitrey.kroshko at scipy.org> wrote:
> hi all,
> isn't it a bug
> (latest numpy from svn, as well as my older version)
>
> from numpy import array
> print array((1,2,3)).fill(10)
> None
Yeah, I do stuff like that too. fill works in place so it returns None.
>> x = np.array([1,2])
>> x.fill(10)
>> x
array([10, 10])
>> x = x.fill(10) # <-- Danger!
>> print x
None
More information about the NumPy-Discussion
mailing list