It was discovered that there is a domain error for the arcos function on line 78 of the snake.py file in certain cases. The theory is that this comes from a rounding error when rotating the head_vector, so adding .unit() will hopefully fix the error.