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

Method __truediv__

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

Source from the content-addressed store, hash-verified

553 return self.__class__(coef, self.domain, self.window, self.symbol)
554
555 def __truediv__(self, other):
556 # there is no true divide if the rhs is not a Number, although it
557 # could return the first n elements of an infinite series.
558 # It is hard to see where n would come from, though.
559 if not isinstance(other, numbers.Number) or isinstance(other, bool):
560 raise TypeError(
561 f"unsupported types for true division: "
562 f"'{type(self)}', '{type(other)}'"
563 )
564 return self.__floordiv__(other)
565
566 def __floordiv__(self, other):
567 res = self.__divmod__(other)

Callers

nothing calls this directly

Calls 1

__floordiv__Method · 0.95

Tested by

no test coverage detected