Re: Slicing wrapped numpy arrays

2008-01-13 Thread Robert Kern
Martin Manns wrote: > On Sun, 13 Jan 2008 16:03:16 -0600 > Robert Kern <[EMAIL PROTECTED]> wrote: > >> Martin Manns wrote: >>> Hi, >>> >>> I have created a class that wraps a numpy array of custom objects. I >>> would like to be able to slice respective objects (without copying >>> the array if po

Re: Slicing wrapped numpy arrays

2008-01-13 Thread Martin Manns
On Sun, 13 Jan 2008 16:03:16 -0600 Robert Kern <[EMAIL PROTECTED]> wrote: > Martin Manns wrote: > > Hi, > > > > I have created a class that wraps a numpy array of custom objects. I > > would like to be able to slice respective objects (without copying > > the array if possible). > > > > I have b

Re: Slicing wrapped numpy arrays

2008-01-13 Thread Robert Kern
Martin Manns wrote: > Hi, > > I have created a class that wraps a numpy array of custom objects. I > would like to be able to slice respective objects (without copying the > array if possible). > > I have browsed the doc and found some hints at __getitem__. However, I > still do not grasp how to

Slicing wrapped numpy arrays

2008-01-13 Thread Martin Manns
Hi, I have created a class that wraps a numpy array of custom objects. I would like to be able to slice respective objects (without copying the array if possible). I have browsed the doc and found some hints at __getitem__. However, I still do not grasp how to do it. How do I implement __getitem