From 281f17802c7c773db021369f81212427d89b5d0e Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 15 Jun 2020 17:10:48 +0100 Subject: [PATCH] Backport PR #34718 on branch 1.0.x (Removed __div__ impls) (#34802) Co-authored-by: William Ayd --- pandas/_libs/interval.pyx | 5 ----- pandas/_libs/tslibs/nattype.pyx | 3 --- 2 files changed, 8 deletions(-) diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index 1166768472449..08daedf5e5096 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -401,11 +401,6 @@ cdef class Interval(IntervalMixin): return Interval(y.left * self, y.right * self, closed=y.closed) return NotImplemented - def __div__(self, y): - if isinstance(y, numbers.Number): - return Interval(self.left / y, self.right / y, closed=self.closed) - return NotImplemented - def __truediv__(self, y): if isinstance(y, numbers.Number): return Interval(self.left / y, self.right / y, closed=self.closed) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 2f972a3153e5e..fe447f57974fe 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -215,9 +215,6 @@ cdef class _NaT(datetime): def __neg__(self): return NaT - def __div__(self, other): - return _nat_divide_op(self, other) - def __truediv__(self, other): return _nat_divide_op(self, other)