roly: segfault in linked list method

2 views
Skip to first unread message

Keith Goodman

unread,
May 2, 2011, 11:58:40 AM5/2/11
to bottl...@googlegroups.com
I get a segfault when the window width is 1.

I commented out my check in linkedlist/move_median:

#if window < 2:
# raise ValueError("I get a segfault when `window` is 1.")

compiled and then:

>> a = np.random.rand(4)
>> move_median(a, 2)
array([ nan, 0.21242825, 0.57218906, 0.87031009])
>> move_median(a, 1)
Segmentation fault

I don't know if the segfault is in cython or C. I guess I'll just
return a copy of the input if window is 1?

Keith Goodman

unread,
May 2, 2011, 12:19:25 PM5/2/11
to bottl...@googlegroups.com

Fixed in https://github.com/kwgoodman/roly/commit/df953a6368eec7224ddfbe7bed08e35752151742

Windows of zero and less were also a problem.

Reply all
Reply to author
Forward
0 new messages