With this PR, the code in this block should not trigger a RuntimeWarning with numpy master or any released numpy supported by scipy.  If it does, it is an error that should be caught by the test.  That's why I have intentionally converted RuntimeWarnings to error.