Skip to content

Commit

Permalink
compat
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Apr 25, 2024
1 parent b003e4d commit 47f905b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion narwhals/_pandas_like/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ def to_numpy(self) -> Any:
has_missing = self._series.isna().any()
if has_missing and str(self._series.dtype) in PANDAS_TO_NUMPY_DTYPE_MISSING:
return self._series.to_numpy(
dtype=PANDAS_TO_NUMPY_DTYPE_MISSING[str(self._series.dtype)]
dtype=PANDAS_TO_NUMPY_DTYPE_MISSING[str(self._series.dtype)],
na_value=float("nan"),
)
if (
not has_missing
Expand Down

0 comments on commit 47f905b

Please sign in to comment.