skip test when scipy is not there.
Fix test error with NumPy 1.7.1.

This is for python long that fit in uint64, but not in an int64. NumPy 1.7 raise an Overflow error, but NumPy 1.7.1 return an uint64.
Catch more specific exception.
remove variable not used and add test for astype.
remove var not used or use them instead of recomputing.
Remove not used var tval, simplify the test and test for the error!
Merge pull request #1348 from nouiz/fixes

Small fixes