Use ensure_type from mdtraj to pass correct types to Cython.