Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
56d8218
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
8ddeef6
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
1054f89
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
8a9444f
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
f781578
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
f0bd87e
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
6876111
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
2da4968
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
39e294d
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
8051185
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
adadbb9
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
31ca6a2
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
475edbd
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
8cfc1e4
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
6963c14
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
c679ab2
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
64c4b33
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
5269709
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
8f982a2
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
12ed4c0
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
4dc4e0c
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
1661942
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
59faffb
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
49aa31a
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
87f3259
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
39d33b8
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
22e1ba3
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
f0e707c
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
a1a0599
Compatibility with NumPy 2.x
ThibaultDECO Oct 29, 2025
847aea1
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
707cf75
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
055757c
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
9fbacd8
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
982b8fe
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
16bb810
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
0cd9939
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
343e3d8
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
d389122
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
d476afa
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
d7a25f0
Update pyproject.toml
ThibaultDECO Oct 30, 2025
7a72c5c
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
9674035
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
2656556
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
e2ffbd0
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
5055d9a
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
cf4d224
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
35f3313
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
8fa5f98
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
863431c
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
9aab7ac
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
6077dd7
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
81f7f0a
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
76e485a
Compatibility with NumPy 2.x
ThibaultDECO Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ recursive-include pmdarima/utils *
include LICENSE
include README.md
include requirements.txt
global-exclude __pycache__
global-exclude __pycache__/*
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ sdist: version
$(PYTHON) setup.py sdist

develop: version
ifeq ($(shell python -c 'import sys; print(sys.version_info >= (3,12))'), True)
$(PYTHON) -m pip install --editable . --no-build-isolation
else
$(PYTHON) setup.py develop
endif

install: version
$(PYTHON) setup.py install
Expand Down
11 changes: 6 additions & 5 deletions build_tools/build_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
numpy==1.21.2; python_version < '3.10'
numpy==1.21.6; python_version == '3.10' and platform_system != 'Windows'
numpy==1.22.3; python_version == '3.10' and platform_system == 'Windows'
numpy==1.23.2; python_version == '3.11'
numpy==1.26.0; python_version == '3.12'
numpy>=1.21.6; python_version == '3.10' and platform_system != 'Windows'
numpy>=1.22.3; python_version == '3.10' and platform_system == 'Windows'
numpy>=1.23.2; python_version == '3.11'
numpy>=1.26.0; python_version == '3.12'
scipy==1.3.2; python_version <= '3.8' and platform_machine != 'aarch64'
scipy==1.5.3; python_version <= '3.8' and platform_machine == 'aarch64'
scipy==1.5.4; python_version == '3.9'
Expand All @@ -19,7 +19,8 @@ patsy
pytest
pytest-mpl
pytest-benchmark
setuptools>=38.6.0,!=50.0.0
setuptools>=42,!=50.0.0,<60.0; python_version < '3.10'
setuptools>=42,!=50.0.0; python_version >= '3.10'
packaging>=17.1 # Bundled with setuptools, but want to be explicit
wheel
twine>=1.13.0
Expand Down
11 changes: 5 additions & 6 deletions build_tools/circle/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ function build_wheel {
ucs_tag="${ucs_tag}u"
fi

distutils_version=""
if [ "$pyver" = "3.12" ]; then
distutils_version="local"
else
distutils_version="stdlib"
fi
if [[ "$pyver" > "3.11" ]]; then
distutils_version="local"
else
distutils_version="stdlib"
fi

ML_PYTHON_VERSION=$(python -c \
"print('cp{maj}{min}-cp{maj}{min}{ucs}'.format( \
Expand Down
2 changes: 1 addition & 1 deletion build_tools/circle/dind/build_manylinux_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PIP="/opt/python/${PYTHON_VERSION}/bin/pip"
# We have to use wheel < 0.32 since they inexplicably removed the open_for_csv
# function from the package after 0.31.1 and it fails for Python 3.6?!
${PIP} install --upgrade pip wheel==0.31.1
${PIP} install --upgrade "setuptools>=38.6.0,!=50.0.0"
${PIP} install --upgrade "setuptools>=42,!=50.0.0"

# NOW we can install requirements
${PIP} install -r /io/build_tools/build_requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
12 changes: 11 additions & 1 deletion pmdarima/arima/arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pandas as pd
import numpy as np

import inspect
import numpy.polynomial.polynomial as np_polynomial
import numbers
import warnings
Expand Down Expand Up @@ -35,6 +36,12 @@
'ARMAtoMA'
]

_CHECK_ARRAY_FINITE_PARAM = (
"ensure_all_finite"
if "ensure_all_finite" in inspect.signature(check_array).parameters
else "force_all_finite"
)


def ARMAtoMA(ar, ma, max_deg):
r"""
Expand Down Expand Up @@ -804,7 +811,10 @@ def predict(self,
# The confidence intervals may be a Pandas frame if it comes from
# SARIMAX & we want Numpy. We will to duck type it so we don't add
# new explicit requirements for the package
return f, check_array(conf_int, force_all_finite=False)
return f, check_array(
conf_int,
**{_CHECK_ARRAY_FINITE_PARAM: False}
)
return f

def __getstate__(self):
Expand Down
12 changes: 6 additions & 6 deletions pmdarima/utils/_array.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ cimport cython
ctypedef np.npy_intp INTP

cdef fused floating1d:
float[::1]
double[::1]
np.float32_t[::1]
np.float64_t[::1]

np.import_array()


@cython.boundscheck(False)
@cython.wraparound(False)
cpdef double[:] C_intgrt_vec(floating1d x,
floating1d xi,
INTP lag):
cpdef np.ndarray[np.float64_t, ndim=1] C_intgrt_vec(floating1d x,
floating1d xi,
INTP lag):
"""Inverse diff

References
Expand All @@ -34,7 +34,7 @@ cpdef double[:] C_intgrt_vec(floating1d x,
.. [2] https://github.com/mirror/r/blob/65a0e33a4b0a119703586fcd1f9742654738ae54/src/library/stats/src/PPsum.c#L46
"""
cdef INTP i, n = x.shape[0]
cdef np.ndarray[double, ndim=1, mode='c'] ans = \
cdef np.ndarray[np.float64_t, ndim=1] ans = \
np.zeros(n + lag, dtype=np.float64, order='c')

with nogil:
Expand Down
15 changes: 11 additions & 4 deletions pmdarima/utils/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from sklearn.utils import validation as skval

import inspect
import numpy as np
import pandas as pd

Expand All @@ -22,6 +23,12 @@
'is_iterable'
]

_CHECK_ARRAY_FINITE_PARAM = (
"ensure_all_finite"
if "ensure_all_finite" in inspect.signature(skval.check_array).parameters
else "force_all_finite"
)


def as_series(x, **kwargs):
"""Cast as pandas Series.
Expand Down Expand Up @@ -179,7 +186,7 @@ def check_endog(
endog = skval.check_array(
y,
ensure_2d=False,
force_all_finite=force_all_finite,
**{_CHECK_ARRAY_FINITE_PARAM: force_all_finite},
copy=copy,
dtype=dtype,
)
Expand Down Expand Up @@ -244,7 +251,7 @@ def check_exog(X, dtype=DTYPE, copy=True, force_all_finite=True):
ensure_2d=True,
dtype=DTYPE,
copy=copy,
force_all_finite=force_all_finite,
**{_CHECK_ARRAY_FINITE_PARAM: force_all_finite},
)


Expand Down Expand Up @@ -389,7 +396,7 @@ def _diff_inv_matrix(x, lag, differences, xi):
xi,
dtype=DTYPE,
copy=False,
force_all_finite=False,
**{_CHECK_ARRAY_FINITE_PARAM: False},
ensure_2d=True,
)
if xi.shape != (lag * differences, m):
Expand Down Expand Up @@ -475,7 +482,7 @@ def diff_inv(x, lag=1, differences=1, xi=None):
x,
dtype=DTYPE,
copy=False,
force_all_finite=False,
**{_CHECK_ARRAY_FINITE_PARAM: False},
ensure_2d=False,
)

Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = [
"numpy==1.21.2; python_version < '3.10'",
"numpy==1.21.6; python_version == '3.10' and platform_system != 'Windows'",
"numpy==1.22.3; python_version == '3.10' and platform_system == 'Windows'",
"numpy==1.23.2; python_version == '3.11'",
"numpy==1.26.0; python_version == '3.12'",
"numpy>=1.21.6; python_version == '3.10' and platform_system != 'Windows'",
"numpy>=1.22.3; python_version == '3.10' and platform_system == 'Windows'",
"numpy>=1.23.2; python_version == '3.11'",
"numpy>=1.26.0; python_version == '3.12'",
"scipy==1.3.2; python_version <= '3.8' and platform_machine != 'aarch64'",
"scipy==1.5.3; python_version <= '3.8' and platform_machine == 'aarch64'",
"scipy==1.5.4; python_version == '3.9'",
Expand All @@ -15,6 +15,7 @@ requires = [
"statsmodels==0.13.3; python_version == '3.11'",
"statsmodels==0.14.0; python_version == '3.12'",
"cython>=0.29,!=0.29.18,!=0.29.31",
"setuptools",
"setuptools>=42,!=50.0.0,<60.0; python_version < '3.10'",
"setuptools>=42,!=50.0.0; python_version >= '3.10'",
]
build-backend = "setuptools.build_meta:__legacy__" # TODO: Don't use legacy backend
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
joblib>=0.11
Cython>=0.29,!=0.29.18,!=0.29.31
numpy>=1.21.2,<2.0.0
numpy>=1.21.2,<2.0.0; python_version < '3.10'
numpy>=1.21.2; python_version >= '3.10'
pandas>=0.19
scikit-learn>=0.22
scipy>=1.3.2
statsmodels>=0.13.2
urllib3
setuptools>=38.6.0,!=50.0.0
setuptools>=42,!=50.0.0,<60.0; python_version < '3.10'
setuptools>=42,!=50.0.0; python_version >= '3.10'
packaging>=17.1 # Bundled with setuptools, but want to be explicit
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ filterwarnings =
ignore:Using or importing the ABCs

[metadata]
description-file = README.md
description_file = README.md
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ def do_setup():
from numpy.distutils.core import setup
print("Setting up with numpy.distutils.core")

# add the config to the metadata
metadata['configuration'] = configuration
# add the config to the metadata
metadata['configuration'] = configuration

# call setup on the dict
setup(**metadata)
Expand Down
Loading