Re: [Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Brennan Williams
Charles R Harris wrote: > > > On Thu, May 7, 2009 at 5:36 PM, Brennan Williams > > wrote: > > I've created an array of strings using something like > > stringarray=self.karray.astype("|S8") > > If the array value is a Nan I

Re: [Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Charles R Harris
On Thu, May 7, 2009 at 5:36 PM, Brennan Williams < brennan.willi...@visualreservoir.com> wrote: > I've created an array of strings using something like > > stringarray=self.karray.astype("|S8") > > If the array value is a Nan I get "1.#QNAN" in my string array. > > For cosmetic re

Re: [Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Robert Kern
On Thu, May 7, 2009 at 19:36, Brennan Williams wrote: > I've created an array of strings using something like > >              stringarray=self.karray.astype("|S8") > > If the array value is a Nan I get "1.#QNAN" in my string array. > > For cosmetic reasons I'd like to change this to something

[Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Brennan Williams
I've created an array of strings using something like stringarray=self.karray.astype("|S8") If the array value is a Nan I get "1.#QNAN" in my string array. For cosmetic reasons I'd like to change this to something else, e.g. "invalid" or "inactive". My string array can be up