>>> import numpy as np >>> a = np.arange(10) >>> flags = a.flags >>> flags C_CONTIGUOUS : True F_CONTIGUOUS : True OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False >>> flags.writeable = False >>> a.flags C_CONTIGUOUS : True F_CONTIGUOUS : True OWNDATA : True WRITEABLE : False <--- WTF!!?? ALIGNED : True UPDATEIFCOPY : False
I understand why this is happening, and that there is no other obvious way to make a.flags.writeable = False work than to have the return of a.flags linked to a under the hood. But I don't think this is documented anywhere, and wonder if perhaps it should. Jaime -- (\__/) ( O.o) ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes de dominación mundial.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion