Fix NaN test
Merge pull request #697 from twpayne/fix-nan-test

Fix NaN test