I was just testing an example from Numerical Methods in Engineering with Python.
from numpy import zeros, array
from math import sin, log
from newto
You are trying to do a logarithm of something that is not positive.
Logarithms figure out the base after being given a number and the power it was raised to. log(0) means that something raised to the power of 2 is 0. An exponent can never result in 0*, which means that log(0) has no answer, thus throwing the math domain error
*Note: 0^0 can result in 0, but can also result in 1 at the same time. This problem is heavily argued over.