def test_deriv():
 np.random.seed(24235)
 for link in Links:
  for k in range(10):
   p = np.random.uniform(0, 1)
   d = link.deriv(p)
   da = nd.approx_fprime(np.r_[p], link)
   assert_allclose(d, da, rtol=1e-06, atol=1e-06, err_msg=str(link))

def test_deriv ( ) : np . random . seed ( 24235 ) for link in Links : for k in range ( 10 ) : p = np . random . uniform ( 0 , 1 ) d = link . deriv ( p ) da = nd . approx_fprime ( np . r_ [ p ] , link ) assert_allclose ( d , da , rtol = 1e-06 , atol = 1e-06 , err_msg = str ( link ) )
check link function derivatives using numeric differentiation .