FIX scale - Raise ValueError when input contains non finite values.

Fixes #3782