Re: [Numpy-discussion] problem with assigning to recarrays

2009-03-02 Thread Brian Gerke
someone else is searching the archive with this question in the future. BFG On Feb 27, 2009, at 10:58 PM, Robert Kern wrote: On Fri, Feb 27, 2009 at 19:06, Brian Gerke bge...@slac.stanford.edu wrote: On Feb 27, 2009, at 4:30 PM, Robert Kern wrote: r[where(r.field1 == 1.)] make a copy

[Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Brian Gerke
Hi- I'm quite new to numpy and to python in general, so I apologize if I'm missing something obvious, but I've come across some seemingly nasty behavior when trying to assign values to the fields of an indexed subarray of a numpy record array. Perhaps an example would explain it best.

Re: [Numpy-discussion] problem with assigning to recarrays

2009-02-27 Thread Brian Gerke
On Feb 27, 2009, at 4:30 PM, Robert Kern wrote: r[where(r.field1 == 1.)] make a copy. There is no way for us to construct a view onto the original memory for this circumstance given numpy's memory model. Many thanks for the quick reply. I assume that this is true only for record arrays,