From 20d09b9de0642e57ae4dd75c320c66d084598b20 Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Sat, 21 Sep 2024 12:58:14 +0100 Subject: [PATCH] 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 --- statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx | 2 +- statsmodels/tsa/holtwinters/_exponential_smoothers.pyx | 2 +- statsmodels/tsa/statespace/_filters/_inversions.pyx.in | 1 + statsmodels/tsa/statespace/_filters/_univariate.pyx.in | 3 ++- statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx.in | 3 ++- 5 files changed, 7 insertions(+), 4 deletions(-) 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 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}} -- 2.30.2