Skip to content

Commit 2641aee

Browse files
committed
Fixup for NumPyExtensionArray
1 parent 33fceb1 commit 2641aee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/arrays/numpy_.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ def interpolate(
287287
See NDFrame.interpolate.__doc__.
288288
"""
289289
# NB: we return type(self) even if copy=False
290+
if not self.dtype._is_numeric:
291+
raise TypeError(f"Cannot interpolate with {self.dtype} dtype")
292+
290293
if not copy:
291294
out_data = self._ndarray
292295
else:

0 commit comments

Comments
 (0)