import numpy as np
from numpy.testing import assert_allclose, assert_equal
+import sys
from scipy import stats
from scipy.stats import poisson, nbinom
# dtype('int32') according to the rule 'safe'.
# To fix this, change the dtype of rvs to int32 so that it
# can bepassed to np.bincount
- if PYTHON_IMPL_WASM:
+ if PYTHON_IMPL_WASM or sys.maxsize<2**33:
+ assert (rvs == rvs.astype(np.int32)).all()
rvs = rvs.astype(np.int32)
freq = np.bincount(rvs)
p = mod.predict(res.params, which="probs", k_max=nobs_rvs)