[Numpy-discussion] array flags not copied/deepcopied

Byron Blay byronblay at googlemail.com
Tue Oct 16 11:36:51 EDT 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.python.org/pipermail/numpy-discussion/attachments/20121016/30ef66c9/attachment.html>


More information about the NumPy-Discussion mailing list