BUG: fix leaking errstate, and ignore invalid= errors in a test

Apparently, Numpy error behavior is different for Python2.6/Numpy 1.5.1 compared to more recent versions, as the invalid flag is not raise in newer versions.

The origin of the failure is trying to exponentiate a matrix that results to matrix elements that overflow the floating point range.

Fixes gh-3662