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

Joon Ro joonpyro at gmail.com
Fri Jan 14 15:03:16 EST 2011


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, force = 0, verbose = 1)


with test(0) = nan returns err = nan correctly, but I don't know how to  
check the nan value inside the c inline c code. Is there any way I can get  
similar functionality as isnan?

Thank you,
Joon
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110114/d2aed926/attachment.html>


More information about the NumPy-Discussion mailing list