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

TST Add test for the same.

Fixes #3782