[Numpy-discussion] Set values of a matrix within a specified range to zero

Sean Mulcahy srmulcahy at gmail.com
Tue Mar 30 12:56:43 EDT 2010


Hello all,

I'm relatively new to numpy.  I'm working with text images as 512x512 arrays.  I would like to set elements of the array whose value fall within a specified range to zero (eg 23 < x < 45).  Any advice is much appreciated.

Sean


More information about the NumPy-Discussion mailing list