loglik[_ip, ...] should already be doing what you want, correctly unpacking the tuple _ip into the indexing.
If you are seeing loglik[0, ...] then loglik[1, ...] when _ip is (0, 1), it suggests that _ip is not a tuple when you expect it to be and you should double-check the type(_ip) inside your loop.