Skip to content

Commit b333351

Browse files
committed
fix: Align to_numpy signatures
Don't need to explicitly define in `CompliantDataFrame`, as it gets it from `NumpyConvertible`
1 parent 3d533a0 commit b333351

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

narwhals/_arrow/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def to_polars(self: Self) -> pl.DataFrame:
508508

509509
return pl.from_arrow(self.native) # type: ignore[return-value]
510510

511-
def to_numpy(self: Self) -> _2DArray:
511+
def to_numpy(self: Self, dtype: Any = None, *, copy: bool | None = None) -> _2DArray:
512512
import numpy as np # ignore-banned-import
513513

514514
arr: Any = np.column_stack([col.to_numpy() for col in self.native.columns])

narwhals/_compliant/dataframe.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def sort(
156156
) -> Self: ...
157157
def tail(self, n: int) -> Self: ...
158158
def to_arrow(self) -> pa.Table: ...
159-
def to_numpy(self) -> _2DArray: ...
160159
def to_pandas(self) -> pd.DataFrame: ...
161160
def to_polars(self) -> pl.DataFrame: ...
162161
@overload

0 commit comments

Comments
 (0)