Thanks for the reproducible code snippet.
In Python2.x the / operator is an integer division, if the inputs are integers (in Python3 it’s //).
Therefore, self.delta_z will be zero:
#Python2.7
(10 - -10) / (51 - 1)
> 0

#Python3.6
(10 - -10) / (51 - 1)
> 0.4

Since delta_z is zero, b will be Inf.
The small number (-922...) is apparently the “int64-representation” of an Inf, but I’m not sure. 
Add this line as the first import in agent.py and your script should work:
from __future__ import division