Use dtype specific comparison

This should remove dtype specific to float32 in the nightly buildbot.