Ensuring IndexError was the point, it was just not really thought out very well (my C background caught up). Changing it to N.