From: Debian Science Maintainers Date: Sun, 21 Jan 2024 09:38:29 +0000 (+0000) Subject: Allow building with Cython 3.x X-Git-Tag: archive/raspbian/0.14.2+dfsg-1+rpi1^2^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=365869b0f268c61eed2faeb7ab0c828a296da8fe;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 e769c0f..1766d17 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 34c1d4b..ef0b7ea 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 843a2cf..bb27555 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 441babd..7e1ed7f 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}}