def copy(self):
result = Scalar(self.size, self.deriv)<EOL>result.v = self.v<EOL>if self.deriv > <NUM_LIT:0>: result.d[:] = self.d[:]<EOL>if self.deriv > <NUM_LIT:1>: result.dd[:] = self.dd[:]<EOL>return result<EOL>
Return a deep copy