Hello! Thank you for reply! I tried to use 'is NaN' as you suggested, but the problem is that I need to obtain the data from a text file. But when I use float('NaN'), I get the 'float' type, naturally. Whereas type(NaN) gives me <type 'sage.symbolic.expression.Expression'> which is different. So I cannot use 'is NaN' construction for the floats obtained by parsing the text file.
v_2e (Jul 31 '12)Thanks! It works! It's a pity I have to check and remove every item in my lists. It may be rather time-consuming with large data sets. Anyway, thank you for the recipe!
v_2e (Aug 01 '12)