what is nan_to_num() for float32 ?
12 Sep
2006
12 Sep
'06
8:33 p.m.
Hi ! I have a nice ndarray image viewer built on OpenGL - one annoyance though is that is crashes if the array contains any NaN, or inf, ... So, I found N.nan_to_num - but OpenGL (read: video cards) supports only single precision float (N.float32) So I get this:
N.nan_to_num([N.inf]) [ 1.79769313e+308] N.nan_to_num([N.inf]).astype(N.float32) [ inf]
Could nan_to_num() get an optional dtype argument ? Thanks, Sebastian Haase
6406
Age (days ago)
6407
Last active (days ago)
2 comments
2 participants
participants (2)
-
Alan G Isaac
-
Sebastian Haase