Well 0d is a float which you can't index into which is what produced an exception here.