From 1a7b9260fc4cf7816a4c4d6d69ff578106222a4c Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Sat, 11 Nov 2023 20:34:28 +0000 Subject: [PATCH] Allow building with Cython 3.x (= Cython _version_ 3.x, not to be confused with the cython3 binary) Author: Chad Fulton Origin: https://github.com/statsmodels/statsmodels/pull/8961 Bug-Ubuntu: https://launchpad.net/bugs/2043284 Forwarded: not-needed (see Origin - but not merged yet) Gbp-Pq: Name cython3p0_compat.patch --- statsmodels/tsa/exponential_smoothing/_ets_smooth.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 ++- 4 files changed, 6 insertions(+), 3 deletions(-) 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/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