Create a deep copy of this monomial. Returns: A new Monomial with the same variables and coefficient.
(self)
| 217 | return self.__truediv__(other) |
| 218 | |
| 219 | def clone(self) -> Monomial: |
| 220 | """Create a deep copy of this monomial. |
| 221 | |
| 222 | Returns: |
| 223 | A new Monomial with the same variables and coefficient. |
| 224 | """ |
| 225 | temp_variables = {i: self.variables[i] for i in self.variables} |
| 226 | return Monomial( |
| 227 | temp_variables, Monomial._rationalize_if_possible(self.coeff) |
| 228 | ).clean() |
| 229 | |
| 230 | def clean(self) -> Monomial: |
| 231 | """Remove variables with zero power. |