Re: [Numpy-discussion] array is not writable

2009-08-26 Thread Charles R Harris
On Wed, Aug 26, 2009 at 10:34 PM, David Warde-Farley wrote: > 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

Re: [Numpy-discussion] array is not writable

2009-08-26 Thread David Warde-Farley
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, maki

Re: [Numpy-discussion] array is not writable

2009-08-26 Thread Robert Kern
On Wed, Aug 26, 2009 at 20:49, 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, m

Re: [Numpy-discussion] array is not writable

2009-08-26 Thread Skipper Seabold
On Wed, Aug 26, 2009 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

Re: [Numpy-discussion] array is not writable

2009-08-26 Thread Mark Wendell
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? thanks Mark On Wed, Aug 26, 2009 at

[Numpy-discussion] array is not writable

2009-08-26 Thread Mark Wendell
Hi all - I'm playing with editing image data converted from PIL objects, and running into a situation where numpy tells me that an 'array is not writable'. Not sure I understand what that means, or how to get around it. Here's a sample interactive session: >>> import Image >>> import numpy as np >