def inv(self):
self.v = <NUM_LIT:1>/self.v<EOL>tmp = self.v**<NUM_LIT:2><EOL>if self.deriv > <NUM_LIT:1>:<EOL><INDENT>self.dd[:] = tmp*(<NUM_LIT:2>*self.v*np.outer(self.d, self.d) - self.dd)<EOL><DEDENT>if self.deriv > <NUM_LIT:0>:<EOL><INDENT>self.d[:] = -tmp*self.d[:]<EOL><DEDENT>
In place invert