diff --git a/crates/polars-core/src/series/arithmetic/borrowed.rs b/crates/polars-core/src/series/arithmetic/borrowed.rs index 6c7a11fafb74..e4b7a535a81b 100644 --- a/crates/polars-core/src/series/arithmetic/borrowed.rs +++ b/crates/polars-core/src/series/arithmetic/borrowed.rs @@ -634,17 +634,8 @@ impl Div for &Series { list_borrowed::NumericListOp::Div.execute(self, rhs) }, _ => { - let leaf_supertype = - try_get_supertype(&self.dtype().leaf_dtype(), &rhs.dtype().leaf_dtype())?; - let leaf_supertype = if leaf_supertype.is_float() { - leaf_supertype - } else { - DataType::Float64 - }; - - let lhs = self.cast(&self.dtype().cast_leaf(leaf_supertype.clone()))?; - let rhs = rhs.cast(&rhs.dtype().cast_leaf(leaf_supertype))?; - lhs.divide(&rhs) + let (lhs, rhs) = coerce_lhs_rhs(self, rhs)?; + lhs.divide(rhs.as_ref()) }, }, } diff --git a/py-polars/polars/series/series.py b/py-polars/polars/series/series.py index 823d8d87e444..84819242e9e1 100644 --- a/py-polars/polars/series/series.py +++ b/py-polars/polars/series/series.py @@ -1088,8 +1088,8 @@ def __truediv__(self, other: Any) -> Series | Expr: self._recursive_cast_to_dtype(Float64()) if not ( self.dtype.is_float() - or self.dtype.is_nested() - or (isinstance(other, Series) and other.dtype.is_nested()) + or isinstance(self.dtype, List) + or (isinstance(other, Series) and isinstance(other.dtype, List)) ) else self )