From 9f984ee0a98ea2475edfead27162c70dff7009d2 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 24 Sep 2024 14:10:02 -0400 Subject: [PATCH] Revert unnecessary change. --- py-polars/polars/series/series.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/py-polars/polars/series/series.py b/py-polars/polars/series/series.py index f532de9011b4..506c52ed9f7a 100644 --- a/py-polars/polars/series/series.py +++ b/py-polars/polars/series/series.py @@ -1019,11 +1019,8 @@ def _arithmetic(self, other: Any, op_s: str, op_ffi: str) -> Self: else: return self._from_pyseries(getattr(self._s, op_s)(_s)) else: - dtype = self.dtype - while hasattr(dtype, "inner"): - dtype = dtype.inner - other = maybe_cast(other, dtype) - f = get_ffi_func(op_ffi, dtype, self._s) + other = maybe_cast(other, self.dtype) + f = get_ffi_func(op_ffi, self.dtype, self._s) if f is None: msg = ( f"cannot do arithmetic with Series of dtype: {self.dtype!r} and argument"