Skip to content

Commit 493a8a1

Browse files
committed
explicitly set language_level=3 for cython
1 parent f0f4ee0 commit 493a8a1

7 files changed

Lines changed: 22 additions & 19 deletions

File tree

pywt/_extensions/_cwt.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#cython: boundscheck=False, wraparound=False
2-
cimport common, c_wt
3-
from common cimport pywt_index_t, MODE
1+
#cython: language_level=3, boundscheck=False, wraparound=False
2+
from . cimport common
3+
from . cimport c_wt
4+
from .common cimport pywt_index_t, MODE
45
from ._pywt cimport _check_dtype
56

67
cimport numpy as np

pywt/_extensions/_dwt.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#cython: boundscheck=False, wraparound=False
2-
cimport common, c_wt
3-
from common cimport pywt_index_t, MODE
1+
#cython: language_level=3, boundscheck=False, wraparound=False
2+
from . cimport common
3+
from . cimport c_wt
4+
from .common cimport pywt_index_t, MODE
45
from ._pywt cimport _check_dtype
56

67
cimport numpy as np

pywt/_extensions/_pywt.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cimport wavelet
1+
from . cimport wavelet
22
cimport numpy as np
33
include "config.pxi"
44

pywt/_extensions/_pywt.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#cython: language_level=3
12
# Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/>
2-
# Copyright (c) 2012-2016 The PyWavelets Developers
3+
# Copyright (c) 2012-2018 The PyWavelets Developers
34
# <https://github.com/PyWavelets/pywt>
45
# See COPYING for license details.
56

@@ -11,8 +12,8 @@ __all__ = ['MODES', 'Modes', 'DiscreteContinuousWavelet', 'Wavelet',
1112
import warnings
1213
import re
1314

14-
cimport c_wt
15-
cimport common
15+
from . cimport c_wt
16+
from . cimport common
1617
from ._dwt cimport upcoef
1718
from ._cwt cimport cwt_psi_single
1819

@@ -1044,7 +1045,7 @@ cpdef np.dtype _check_dtype(data):
10441045
def keep(arr, keep_length):
10451046
length = len(arr)
10461047
if keep_length < length:
1047-
left_bound = (length - keep_length) / 2
1048+
left_bound = (length - keep_length) // 2
10481049
return arr[left_bound:left_bound + keep_length]
10491050
return arr
10501051

pywt/_extensions/_swt.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#cython: boundscheck=False, wraparound=False
2-
cimport common
3-
cimport c_wt
1+
#cython: language_level=3, boundscheck=False, wraparound=False
2+
from . cimport common
3+
from . cimport c_wt
44

55
import warnings
66
import numpy as np
77
cimport numpy as np
88

9-
from common cimport pywt_index_t
9+
from .common cimport pywt_index_t
1010
from ._pywt cimport c_wavelet_from_object, cdata_t, Wavelet, _check_dtype
1111

1212
include "config.pxi"

pywt/_extensions/c_wt.pxd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# <https://github.com/PyWavelets/pywt>
44
# See COPYING for license details.
55

6-
from common cimport (MODE, pywt_index_t, ArrayInfo, Coefficient,
7-
DiscreteTransformType)
8-
from wavelet cimport DiscreteWavelet, ContinuousWavelet
6+
from .common cimport (MODE, pywt_index_t, ArrayInfo, Coefficient,
7+
DiscreteTransformType)
8+
from .wavelet cimport DiscreteWavelet, ContinuousWavelet
99

1010
include "config.pxi"
1111

pywt/_extensions/wavelet.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from common cimport pywt_index_t
1+
from .common cimport pywt_index_t
22

33
cdef extern from "c/wavelets.h":
44
ctypedef enum SYMMETRY:

0 commit comments

Comments
 (0)