[Numpy-discussion] Is this a bug?
Fri Jul 31 17:30:30 CDT 2009
ahh, yeah I see now. Thanks!
nothing like making myself look the fool on a friday!
On Fri, Jul 31, 2009 at 6:20 PM, Robert Kern<firstname.lastname@example.org> wrote:
> On Fri, Jul 31, 2009 at 17:15, Chris Colbert<email@example.com> wrote:
>> Numpy 1.3
>> In : import numpy as np
>> In : a = np.zeros(5).fill(5)
>> In : a
>> In : type(a)
>> Out: <type 'NoneType'>
>> In : a = np.zeros(5)
>> In : a.fill(5)
>> In : a
>> Out: array([ 5., 5., 5., 5., 5.])
>> What i'm trying to do may not be the best way, but I think it should
>> still have worked.
> Not a bug. As you can see from In, .fill() does not return anything
> (except the obligatory None). This is just like how list.sort()
> returns None.
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> NumPy-Discussion mailing list
More information about the NumPy-Discussion