5.17.2.5. eqcorrscan.utils.sfile_util._str_conv

eqcorrscan.utils.sfile_util._str_conv(number, rounded=False)[source]

Convenience tool to convert a number, either float or int into a string. If the int is 999, or the float is NaN, returns empty string.

>>> _str_conv(12.3)
'12.3'
>>> _str_conv(12.34546, rounded=1)
'12.3'