A zero pattern algebra is a matrix subalgebra of Cn×n determined by a pattern of zeros. The issue in this paper is: under what conditions is a matrix in a zero pattern algebra A a sum of (rank one) idempotents in A or a logarithmic residue in A? Here logarithmic residues are contour integrals of logarithmic derivatives of analytic A-valued functions. It turns out that there is a necessary condition involving certain rank/trace requirements. Although these requirements are generally not sufficient, there are several important cases where they are.