Update common.py

Force violate array to be of type int. When no nan values are found, the array defaults to an empty array of type float, so you get an error: *** IndexError: arrays used as indices must be of integer (or boolean) type