TST: lib, linalg: fix blas tests with intent(in,out) arguments

f2py intent(in,out) does not guarantee in-place operations.
Merge pull request #4267 from pv/tstf2pyinout

TST: lib, linalg: fix blas tests with intent(in,out) arguments