From 6313a7b9245549f653f7c5f1a566c8424a3e8208 Mon Sep 17 00:00:00 2001 From: John Glover Date: Mon, 2 Jul 2012 19:30:23 +0100 Subject: [peak_detection] Bug fix: use bool instead of int in static_frame_size. --- simpl/peak_detection.pxd | 3 ++- simpl/peak_detection.pyx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/simpl/peak_detection.pxd b/simpl/peak_detection.pxd index 867a89e..c7dfc2e 100644 --- a/simpl/peak_detection.pxd +++ b/simpl/peak_detection.pxd @@ -2,6 +2,7 @@ import numpy as np cimport numpy as np np.import_array() from libcpp.vector cimport vector +from libcpp cimport bool from base cimport c_Peak from base cimport c_Frame @@ -18,7 +19,7 @@ cdef extern from "../src/simpl/peak_detection.h" namespace "simpl": int frame_size() void frame_size(int new_frame_size) int static_frame_size() - void static_frame_size(int new_static_frame_size) + void static_frame_size(bool new_static_frame_size) int next_frame_size() int hop_size() void hop_size(int new_hop_size) diff --git a/simpl/peak_detection.pyx b/simpl/peak_detection.pyx index 12f47b2..8987564 100644 --- a/simpl/peak_detection.pyx +++ b/simpl/peak_detection.pyx @@ -2,6 +2,7 @@ import numpy as np cimport numpy as np np.import_array() from libcpp.vector cimport vector +from libcpp cimport bool from base cimport Peak from base cimport Frame @@ -29,7 +30,7 @@ cdef class PeakDetection: property static_frame_size: def __get__(self): return self.thisptr.static_frame_size() - def __set__(self, int i): self.thisptr.static_frame_size(i) + def __set__(self, bool b): self.thisptr.static_frame_size(b) def next_frame_size(self): return self.thisptr.next_frame_size() -- cgit v1.2.3