Open thouis opened 11 years ago
Comment in Trac by atmention:rgommers, 2010-07-18
Asking this on the mailing list will probably get you an answer. Here it probably won't any time soon.
Comment in Trac by atmention:mwiebe, 2011-03-25
This looks like a bug to me - data should be a read-only attribute of the array class. This crashes for me in 1.6 beta.
Original ticket http://projects.scipy.org/numpy/ticket/1275 Reported 2009-10-25 by trac user mcieslik, assigned to unknown.
It's probably not a bug, but I'd like to ask for clarification. I try to make two arrays share memory. I create big array from small arrays (this involves a copy e.g. by vstack). Create slice/views of the big array corresponding to the small arrays and do a array.data assignment i.e.:
This works, both arrays can now modify the same memory, but is not safe as it can lead to memory corruption (see below). My first question: is this considered very very bad practice and if so how to point an ndarray instance to a new memory safely.