anchor.diff:  cf2py integer intent(hide),depend(x,p),check(k==shape(p,1)) :: k=shape(x,1)
   cf2py double precision intent(out) :: like      
   
  -      DOUBLE PRECISION like, factln, infinity
  +      DOUBLE PRECISION like, factln, infinity, sump, pk
         DOUBLE PRECISION p(np,k), p_tmp(k)
  -      INTEGER i,j,n(nn),n_tmp
  +      INTEGER i,j,n(nn),n_tmp,sumx,xk
         INTEGER x(nx,k)
         PARAMETER (infinity = 1.7976931348623157d308)
   
  
positive.code: 
  c Multinomial log-likelihood function     
  c Updated 12/02/2007 DH. N-D still buggy.
  
  cf2py integer dimension(nx,k),intent(in) :: x
  cf2py integer dimension(nn), intent(in) :: n
  
negative.code:           RETURN
          endif
          
          sumx = 0
          sump = 0.0
          do i=1,k
            if ((x(j,i) .LT. 0) .OR. (p_tmp(i) .LT. 1E-10)) then
              like = -infinity
  