[Numpy-discussion] NaN value processing in weave.inline code

2011-01-14 Thread Joon Ro
Hi,I was wondering if it is possible to process (in if statement - check if the given value is NaN) numpy NaN value inside the weave.inline c code.testcode = '''if (test(0)) { return_val = test(0);}'''err = weave.inline(testcode,['test'], type_converters = converters.blitz,

Re: [Numpy-discussion] NaN value processing in weave.inline code

2011-01-14 Thread Keith Goodman
On Fri, Jan 14, 2011 at 12:03 PM, Joon Ro joonp...@gmail.com wrote: Hi, I was wondering if it is possible to process (in if statement - check if the given value is NaN) numpy NaN value inside the weave.inline c code. testcode = ''' if (test(0)) {       return_val = test(0); } ''' err =

Re: [Numpy-discussion] NaN value processing in weave.inline code

2011-01-14 Thread Joon Ro
Oops .. I guess isnan() inside the weave code just works fine. Should have tried this first.By the way, is there any speed lost doing this? Should I convert all NaN values into a integer and use it inside the weave inline c code?-JoonOn Fri, 14 Jan 2011 14:03:16 -0600, Joon Ro joonp...@gmail.com