Skip to content

Commit

Permalink
merge main, fix lit doctest, rm type
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Nov 10, 2024
1 parent bf5d0fd commit ae9791a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions narwhals/_arrow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ def validate_dataframe_comparand(
import numpy as np # ignore-banned-import
import pyarrow as pa # ignore-banned-import

value = other[0]
value = other._native_series[0]
if backend_version < (13,) and hasattr(value, "as_py"): # pragma: no cover
value = value.as_py()
return pa.array(np.full(shape=length, fill_value=value, dtype=type(value)))
return pa.array(np.full(shape=length, fill_value=value))
return other._native_series

from narwhals._arrow.dataframe import ArrowDataFrame # pragma: no cover
Expand Down
4 changes: 2 additions & 2 deletions narwhals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5203,8 +5203,8 @@ def lit(value: Any, dtype: DType | None = None) -> Expr:
>>> func(df_pd)
a literal
0 1 3
1 2 3
0 1 3
1 2 3
>>> func(df_pl)
shape: (2, 2)
┌─────┬─────────┐
Expand Down
4 changes: 2 additions & 2 deletions narwhals/stable/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,8 @@ def lit(value: Any, dtype: DType | None = None) -> Expr:
>>> func(df_pd)
a literal
0 1 3
1 2 3
0 1 3
1 2 3
>>> func(df_pl)
shape: (2, 2)
┌─────┬─────────┐
Expand Down

0 comments on commit ae9791a

Please sign in to comment.