Fix overflow error in cartesian_product
When the numbers in `X` are large it can cause an overflow error on windows machine where the native `int` is 32 bit. Switching to np.intp alleviates this problem.

Other fixes would include switching to np.uint32 or np.uint64.

#15234 
