Skip to content

Commit

Permalink
Merge pull request #265 from rgommers/warnings
Browse files Browse the repository at this point in the history
MAINT: fix more compiler warnings
  • Loading branch information
grlee77 committed Jan 2, 2017
2 parents 45cf2a5 + e686ee0 commit dc51aa7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pywt/_extensions/_dwt.pxd
@@ -1,3 +1,4 @@
from ._pywt cimport Wavelet, data_t

cpdef upcoef(bint do_rec_a, data_t[::1] coeffs, Wavelet wavelet, int level, int take)
cpdef upcoef(bint do_rec_a, data_t[::1] coeffs, Wavelet wavelet, int level,
size_t take)
3 changes: 2 additions & 1 deletion pywt/_extensions/_dwt.pyx
Expand Up @@ -233,7 +233,8 @@ cpdef idwt_axis(np.ndarray coefs_a, np.ndarray coefs_d,

return output

cpdef upcoef(bint do_rec_a, data_t[::1] coeffs, Wavelet wavelet, int level, int take):
cpdef upcoef(bint do_rec_a, data_t[::1] coeffs, Wavelet wavelet, int level,
size_t take):
cdef data_t[::1] rec
cdef int i, retval
cdef size_t rec_len, left_bound, right_bound, coeffs_size
Expand Down
7 changes: 4 additions & 3 deletions pywt/_extensions/_swt.pyx
Expand Up @@ -33,9 +33,9 @@ def swt_max_level(size_t input_len):
def swt(data_t[::1] data, Wavelet wavelet, size_t level, size_t start_level):
cdef data_t[::1] cA, cD
cdef Wavelet w
cdef int i, retval
cdef int retval
cdef size_t end_level = start_level + level
cdef size_t data_size, output_len
cdef size_t data_size, output_len, i

if data.size % 2:
raise ValueError("Length of data must be even.")
Expand Down Expand Up @@ -105,7 +105,8 @@ cpdef swt_axis(np.ndarray data, Wavelet wavelet, size_t level,
# Explicit input_shape necessary to prevent memory leak
cdef size_t[::1] input_shape, output_shape
cdef size_t end_level = start_level + level
cdef int i, retval
cdef int retval
cdef size_t i

if data.size % 2:
raise ValueError("Length of data must be even.")
Expand Down
3 changes: 0 additions & 3 deletions pywt/_extensions/c/wavelets.c
Expand Up @@ -584,9 +584,6 @@ DiscreteWavelet* copy_discrete_wavelet(DiscreteWavelet* base)

if(base == NULL) return NULL;

if(base->dec_len < 0 || base->rec_len < 0)
return NULL;

w = wtmalloc(sizeof(DiscreteWavelet));
if(w == NULL) return NULL;

Expand Down
2 changes: 1 addition & 1 deletion pywt/_extensions/c/wt.template.c
Expand Up @@ -443,7 +443,7 @@ int CAT(TYPE, _idwt)(const TYPE * const restrict coeffs_a, const size_t coeffs_a
/* basic SWT step (TODO: optimize) */
int CAT(TYPE, _swt_)(const TYPE * const restrict input, pywt_index_t input_len,
const TYPE * const restrict filter, pywt_index_t filter_len,
TYPE * const restrict output, pywt_index_t output_len,
TYPE * const restrict output, size_t output_len,
unsigned int level){

TYPE * e_filter;
Expand Down

0 comments on commit dc51aa7

Please sign in to comment.