Why don't you import expm1 from scipy.special also, since numpy.expm1(inf) returns nan on windows?