The python script triggered the segmentation fault that is summarized in the gdb backtrace. Python provided no information beyond "Segmentation fault".
The two data files should be placed in a directory named ap
as a sibling of the python script. These files are taken from the lda-c repository of the Blei lab.