def _grad(self, m, me, la, n, f, g, df, dg, xnew):
        """ Return ndarrays containing the gradients of the objective
        and constraints.

        Note: m, me, la, n, f, and g are unused inputs."""

        J = self._calc_gradient(self.inputs, self.obj + self.con)
        #print "gradient", J
        df[0:self.nparam] = J[0, :].ravel()

        if self.ncon > 0:
            dg[0:self.ncon, 0:self.nparam] = -J[1:1+self.ncon, :]

        return df, dg
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/drivers/slsqpdriver.py/SLSQPdriver._grad/original