Re: deleting certain entries in numpy array

2009-07-02 Thread Robert Kern
On 2009-07-02 04:40, Sebastian Schabe wrote: Robert Kern schrieb: > You will want to ask numpy questions on the numpy mailing list. > > http://www.scipy.org/Mailing_Lists > I ever thought news-groups are the right way for questions like this. And the mailing list page just confuses me, bu

Re: deleting certain entries in numpy array

2009-07-02 Thread Sebastian Schabe
Robert Kern schrieb: First, convert the pos array to integers, and just the columns with indices in them: ipos = pos[:,:2].astype(int) Now check the values in the mask corresponding to these positions: mask_values = mask[ipos[:,0], ipos[:,1]] Now extract the rows from the original pos ar

Re: deleting certain entries in numpy array

2009-07-01 Thread Robert Kern
On 2009-07-01 09:51, Sebastian Schabe wrote: Hello everybody, I'm new to python and numpy and have a little/special problem: You will want to ask numpy questions on the numpy mailing list. http://www.scipy.org/Mailing_Lists I have an numpy array which is in fact a gray scale image mask, e

Re: deleting certain entries in numpy array

2009-07-01 Thread Ben Finney
Sebastian Schabe writes: > I want to avoid a for loop (if possible!!!) cause I think (but don't > know) numpy array are handled in another way. Yes, Numpy arrays can be indexed logically by a boolean array. > I think numpy.delete is the right function for discarding the values, > but I don't kn