fixed seg fault when attempting to get a plot array (in python) when an element is out of range