Revert "Remove .is_finite assumption"

This reverts commit f5d54d0d0f1f8604850e64d2667ce3b83f1ecb35.