The ufloat_fromstr documentation does not mention how the function generates an uncertainty if the string representation does not contain one. Is it always 1 to the last significant digit? Also, I doubt that it makes sense to assign an uncertainty to a NaN value.
Examples:
ufloat_fromstr("123") -> 123.0+/-1.0
ufloat_fromstr("987") -> 987.0+/-1.0
ufloat_fromstr("0.9999") -> 0.9999+/-0.0001
ufloat_fromstr("nan") -> nan+/-1.0