MCPcopy Create free account
hub / github.com/numpy/numpy / __divmod__

Method __divmod__

numpy/polynomial/_polybase.py:578–588  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

576 return res[1]
577
578 def __divmod__(self, other):
579 othercoef = self._get_coefficients(other)
580 try:
581 quo, rem = self._div(self.coef, othercoef)
582 except ZeroDivisionError:
583 raise
584 except Exception:
585 return NotImplemented
586 quo = self.__class__(quo, self.domain, self.window, self.symbol)
587 rem = self.__class__(rem, self.domain, self.window, self.symbol)
588 return quo, rem
589
590 def __pow__(self, other):
591 coef = self._pow(self.coef, other, maxpower=self.maxpower)

Callers 2

__floordiv__Method · 0.95
__mod__Method · 0.95

Calls 2

_get_coefficientsMethod · 0.95
_divMethod · 0.95

Tested by

no test coverage detected