First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 8 years ago

ndomes gravatar image

The error "list index out of range" occurs if solve returns an empty list. You can capture this exception with a try except statement:

    try:
        C = circle((sol[1][0].rhs(),sol[1][1].rhs()),sol[1][2].rhs())    
    except:
        pass