np.int and np.long are deprecated since numpy 1.20.0. It should be replaced by int (or np.int32) and np.int64.