[Numpy-discussion] Is this a bug?

Chris Colbert sccolbert@gmail....
Fri Jul 31 17:15:25 CDT 2009


Numpy 1.3

In [1]: import numpy as np

In [2]: a = np.zeros(5).fill(5)

In [3]: a

In [4]: type(a)
Out[4]: <type 'NoneType'>

In [5]: a = np.zeros(5)

In [6]: a.fill(5)

In [7]: a
Out[7]: 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.

Thoughts?

Cheers,

Chris


More information about the NumPy-Discussion mailing list