[Numpy-discussion] array flags not copied/deepcopied

Byron Blay byronblay@googlemail....
Tue Oct 16 10:36:51 CDT 2012


Copying / deepcopying an array does not copy the writeable flag:

>>> import numpy
>>> from copy import deepcopy
>>> a = numpy.array([1,2,3,4,5])
>>> a.flags.writeable = False
>>> b = deepcopy(a)
>>> b.flags.writeable
True

Is this a bug?
Should I raise an issue on github?

Many thanks,
Byron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20121016/30ef66c9/attachment.html 


More information about the NumPy-Discussion mailing list