Are these nan's documented?  Can we raise warnings when they occur?  I really hate nan's in my output data--the only option for following up is to go and read through the code, usually!