You should enforce `X` to be of the same type as the one set in `mf_.pyx`.