anchor.diff:            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
  
positive.code:           endif
            
            like = like + x(j,i)*dlog(p_tmp(i)) - factln(x(j,i))
  
          enddo
          like = like + factln(n_tmp)
        enddo
        RETURN
  
negative.code: 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, sump, pk
        DOUBLE PRECISION p(np,k), p_tmp(k)
        INTEGER i,j,n(nn),n_tmp,sumx,xk
        INTEGER x(nx,k)
        PARAMETER (infinity = 1.7976931348623157d308)
  
  