Merge pull request #3241 from jenshnielsen/numpy_clean_warnings

Cast to integer to get rid of numpy warning