During #5678 it came up that one should prefer isinstance(x, six.integer_types) to detect that a variable contains an integral number over isinstance(x, (numbers.Integral, np.integer)). There are a few occurrences of the latter spread around the code base according to a quick grep. Switching those would make a nice first contribution.