code: def _diff(self, x, th, eps):
          
          foo = lambda y: self.igen(numpy.sum(self.gen(y, th), 0), th)
  
          out1 = out2 = 0.
          sign = 1 - 2*(x > .5).T
          for I in numpy.ndindex(*((2,)*(len(x)-1)+(1,))):
  
              eps_ = numpy.array(I)*eps
              x_ = (x.T + sign*eps_).T
              out1 += (-1)**sum(I)*foo(x_)
  
              x_[-1] = 1
              out2 += (-1)**sum(I)*foo(x_)
  
          out = out1/out2
          return out
docs: Differentiation function.
  
          Numerical approximation of a Rosenblatt transformation created from
          copula formulation.