On 26-Aug-09, at 11:49 PM, Mark Wendell wrote: > Figured this much out: if I do an np.copy of the original array to a > new array, then I can edit individual 'color' values with impunity. So > I guess the original array from the pil object still shares memory > with that image object somehow, making it unwritable?
I'm going to guess that it's because PIL is still responsible for that memory, not NumPy. I don't really know how this stuff works but asarray() would just give you a view onto that chunk of memory; since NumPy didn't allocate it, it probably doesn't want to modify it. Not sure if you can get away with not making a copy in this situation. David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion