diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 3a5eefec8..0dfec7ae5 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -80,7 +80,7 @@ jobs: # Runs tests and checks for a numpy regression by upgrading numpy and running tests again CIBW_TEST_COMMAND: > pytest --showlocals --durations=20 --pyargs pmdarima && - pip install --upgrade numpy && + pip install --upgrade scipy numpy && pytest --showlocals --durations=20 --pyargs pmdarima # Avoid testing on emulated architectures CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64" diff --git a/pmdarima/arima/_auto_solvers.py b/pmdarima/arima/_auto_solvers.py index 528b8e22d..006c199e3 100755 --- a/pmdarima/arima/_auto_solvers.py +++ b/pmdarima/arima/_auto_solvers.py @@ -99,8 +99,10 @@ def __init__(self, y, X, fit_partial, d, D, m, max_order, if random: random_state = check_random_state(random_state) - # make a list to scramble... - gen = random_state.permutation(list(gen))[:n_fits] + # make a list to scramble... `gen` may have a ragged nested + # sequence, so we have to explicitly use dtype='object', otherwise + # it will raise a ValueError on numpy >= 1.24 + gen = random_state.permutation(np.array(list(gen), dtype='object'))[:n_fits] # noqa: E501 self.gen = gen self.n_jobs = n_jobs