def dlogpdf_dlink(self, inv_link_f, y, Y_metadata=None):
N = Y_metadata['<STR_LIT>']<EOL>np.testing.assert_array_equal(N.shape, y.shape)<EOL>Ny = N-y<EOL>t1 = np.zeros(y.shape)<EOL>t2 = np.zeros(y.shape)<EOL>t1[y><NUM_LIT:0>] = y[y><NUM_LIT:0>]/inv_link_f[y><NUM_LIT:0>]<EOL>t2[Ny><NUM_LIT:0>] = (Ny[Ny><NUM_LIT:0>])/(<NUM_LIT:1.>-inv_link_f[Ny><NUM_LIT:0>])        <EOL>return t1 - t2<EOL>
Gradient of the pdf at y, given inverse link of f w.r.t inverse link of f.

.. math::
    \\frac{d^{2}\\ln p(y_{i}|\\lambda(f_{i}))}{d\\lambda(f)^{2}} = \\frac{y_{i}}{\\lambda(f)} - \\frac{(N-y_{i})}{(1-\\lambda(f))}

:param inv_link_f: latent variables inverse link of f.
:type inv_link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: Y_metadata must contain 'trials'
:returns: gradient of log likelihood evaluated at points inverse link of f.
:rtype: Nx1 array