mattjj / pyhsmm

MIT License
546 stars 173 forks source link

A fix for the "invalid conversion to int" compilation error. #56

Closed allista closed 8 years ago

allista commented 8 years ago

Compilation of pyhsmm on Ubuntu 14.04 fails with error: pyhsmm/internals/hsmm_messages_interface.cpp:1167:61: error: invalid conversion from ‘__pyx_t_5numpy_int32t* {aka long int}’ to ‘int_’ [-fpermissive]

I've redefined stateseq as _int32t[::1] and used np.asarray(stateseq) as a return value in h(s)mm_messages_interface.pyx to fix it.

mattjj commented 8 years ago

Thanks!

Still not sure what combination of factors caused this error since the Travis build worked on Ubuntu. Maybe it was an i686 issue. (c.f. https://github.com/mattjj/pyhsmm/issues/27#issuecomment-168426278)