Skip to content

Commit

Permalink
Fix memory corruption in fttcep
Browse files Browse the repository at this point in the history
part of #18
  • Loading branch information
r9y9 committed Sep 7, 2015
1 parent a51976f commit 7de36c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/SPTK
Submodule SPTK updated 1 files
+8 −5 bin/fftcep/_fftcep.c
2 changes: 1 addition & 1 deletion pysptk/sptk.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def fftcep(np.ndarray[np.float64_t, ndim=1, mode="c"] logsp not None,
cdef np.ndarray[np.float64_t, ndim = 1, mode = "c"] c
cdef int logsp_length = len(logsp)
c = np.zeros(order + 1, dtype=np.float64)
_fftcep(&logsp[0], logsp_length, &c[0], order + 1,
_fftcep(&logsp[0], logsp_length, &c[0], order,
num_iter, acceleration_factor)

return c
Expand Down
5 changes: 2 additions & 3 deletions tests/test_mgcep.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ def __test(order):
c = pysptk.fftcep(logsp, order)
assert np.all(np.isfinite(c))

warn("TODO: fix memory corruption in fftcep")
# for order in [15, 20, 25]:
# yield __test, order
for order in [15, 20, 25]:
yield __test, order


def test_lpc():
Expand Down

0 comments on commit 7de36c8

Please sign in to comment.