[Numpy-discussion] Setting WRITEABLE flag on array scalar

Stefan van der Walt stefan@sun.ac...
Thu Jan 10 13:02:52 CST 2008


On Thu, Jan 10, 2008 at 10:21:28AM -0600, Travis E. Oliphant wrote:
> You can't do it, because there is no place for the information to go.   
> The array scalars are always read-only anyway.  So, there should be no 
> reason to set this flag.

Right, I was confused because I saw:

In [1]: x = N.bool_(3)

In [2]: x
Out[2]: True

In [3]: x += 1

In [4]: x
Out[4]: 2

But now I see that iadd does not actually change the original value.


More information about the Numpy-discussion mailing list