This looks very useful. However, is it true that it cannot handle NaNs?
---> 40 return converter(value, precision, filler)
41
42
/Volumes/Apps_and_Docs/JRR_Utils/anaconda/lib/python2.7/site-packages/to_precision.pyc in sci_notation(value, precision, filler)
82 [email protected]
83 '''
---> 84 is_neg, sig_digits, dot_power, ten_power = _sci_notation(value, precision)
85
86 return ('-' if is_neg else '') + _place_dot(sig_digits, dot_power) + filler + str(ten_power)
/Volumes/Apps_and_Docs/JRR_Utils/anaconda/lib/python2.7/site-packages/to_precision.pyc in _sci_notation(value, precision)
123 [email protected]
124 '''
--> 125 sig_digits, power, is_neg = _number_profile(value, precision)
126
127 dot_power = -(precision - 1)
/Volumes/Apps_and_Docs/JRR_Utils/anaconda/lib/python2.7/site-packages/to_precision.pyc in _number_profile(value, precision)
191
192 power = -1 * math.floor(math.log10(value)) + precision - 1
--> 193 sig_digits = str(int(round(abs(value) * 10.0**power)))
194
195 return sig_digits, int(-power), is_neg
ValueError: cannot convert float NaN to integer