Re: [Numpy-discussion] removing and replacing certain values in arrays

2008-07-07 Thread Robert Kern
On Mon, Jul 7, 2008 at 15:08, Tim Michelsen <[EMAIL PROTECTED]> wrote: > Hello, > how do I remove all rows (or column) from an array which contain a > certain value or sting? Modification in-place is not possible. You will have to make a boolean mask, then use boolean indexing to pull out a new a

Re: [Numpy-discussion] removing and replacing certain values in arrays

2008-07-07 Thread Pierre GM
On Monday 07 July 2008 16:08:36 Tim Michelsen wrote: > Hello, > how do I remove all rows (or column) from an array which contain a > certain value or sting? Timmie, You could try a combination of masking the values you want to discard, followed by ma.compress_rows/cols, provided your array is 2D

[Numpy-discussion] removing and replacing certain values in arrays

2008-07-07 Thread Tim Michelsen
Hello, how do I remove all rows (or column) from an array which contain a certain value or sting? some like: array.delte_row_from_array_wich_contains('March') array.delte_row_from_array_wich_contains(-333) Is there also possibility to replace all occurences of a certain value in a array by n