Cast to integer to get rid of numpy warning