Fix for deprecation of nans()
Merge pull request #7 from timholy/pull-request/f8a75422

Fix for deprecation of nans()