From: Debian Science Maintainers Date: Thu, 18 Dec 2025 07:37:30 +0000 (+0000) Subject: Allow building with Cython 3.x X-Git-Tag: archive/raspbian/0.14.6+dfsg-1+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e78a9f6d7088d2bf57a8cced5b978bef62b85929;p=statsmodels.git Allow building with Cython 3.x (= Cython _version_ 3.x, not to be confused with the cython3 binary) Author: Chad Fulton, Rebecca N. Palmer Origin: mostly https://github.com/statsmodels/statsmodels/pull/8961 Bug-Ubuntu: https://launchpad.net/bugs/2043284 Forwarded: no Gbp-Pq: Name cython3p0_compat.patch --- diff --git a/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx b/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx index a5418aa..04703db 100644 --- a/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx +++ b/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx @@ -1,5 +1,5 @@ #!python -#cython: wraparound=False, boundscheck=False, cdivision=True +#cython: wraparound=False, boundscheck=False, cdivision=True, cpow=True from cpython cimport bool import numpy as np diff --git a/statsmodels/tsa/holtwinters/_exponential_smoothers.pyx b/statsmodels/tsa/holtwinters/_exponential_smoothers.pyx index b244d85..787d2bd 100644 --- a/statsmodels/tsa/holtwinters/_exponential_smoothers.pyx +++ b/statsmodels/tsa/holtwinters/_exponential_smoothers.pyx @@ -1,5 +1,5 @@ #!python -#cython: language_level=3, wraparound=False, boundscheck=False, cdivision=True +#cython: language_level=3, wraparound=False, boundscheck=False, cdivision=True, cpow=True import numpy as np diff --git a/statsmodels/tsa/statespace/_filters/_inversions.pyx.in b/statsmodels/tsa/statespace/_filters/_inversions.pyx.in index 7368788..583957f 100644 --- a/statsmodels/tsa/statespace/_filters/_inversions.pyx.in +++ b/statsmodels/tsa/statespace/_filters/_inversions.pyx.in @@ -1,6 +1,7 @@ #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False +#cython: cpow=True """ State Space Models diff --git a/statsmodels/tsa/statespace/_filters/_univariate.pyx.in b/statsmodels/tsa/statespace/_filters/_univariate.pyx.in index 9008960..b9a9928 100644 --- a/statsmodels/tsa/statespace/_filters/_univariate.pyx.in +++ b/statsmodels/tsa/statespace/_filters/_univariate.pyx.in @@ -2,6 +2,7 @@ #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False +#cython: cpow=True """ State Space Models @@ -617,4 +618,4 @@ cdef {{cython_type}} {{prefix}}loglikelihood_univariate({{prefix}}KalmanFilter k cdef {{cython_type}} {{prefix}}scale_univariate({{prefix}}KalmanFilter kfilter, {{prefix}}Statespace model): return 0 -{{endfor}} \ No newline at end of file +{{endfor}} diff --git a/statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx.in b/statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx.in index 548bffc..9c6cde0 100644 --- a/statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx.in +++ b/statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx.in @@ -2,6 +2,7 @@ #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False +#cython: cpow=True """ State Space Models @@ -300,4 +301,4 @@ cdef {{cython_type}} {{prefix}}inverse_noop_univariate_diffuse({{prefix}}KalmanF cdef {{cython_type}} {{prefix}}loglikelihood_univariate_diffuse({{prefix}}KalmanFilter kfilter, {{prefix}}Statespace model, {{cython_type}} determinant): return 0 -{{endfor}} \ No newline at end of file +{{endfor}}