FIX scale - Raise ValueError when input contains non finite

Fixes #3782