PyCurvelab
PyCurvelab copied to clipboard
Segment fault when running `fwd`
(I have to change from fdct.fdct.__init__(self, ...)
to super(fdct2, self).__init__(...)
(or super(fdct3, self).__init__(...)
in fdct2.py
(or fdct3.py
) but this shouldn't matter)
import numpy as np
mport pyct
from pyct.fdct3 import fdct3
shape = (128,128,128)
a = np.random.randn(*shape)
F = fdct3(shape, 4, 8, True)
F.fwd(a) # gives "segmentation fault (core dumped)"
Any ideas?
Which version of python(s) are you running?
Hi, I was having a similar issue with fdct2 and fdct3 with Python 2 and 3 (using the last Anacoda packages for both). I was getting "segmentation fault" even in simple tests like the above running on Linux computer (on Macs it works without problem). However, importing pyct before numpy solved the problem for the fdct2.
For fdct3 it didn't fix the problem and introduced something new. Instead of segmentation fault, when I call curv3d.fwd(data) the python terminal freezes (such as an infinity loop).
Is there any suggestion of how to solve this?
Thanks.