Skip to content

Commit 3e1275e

Browse files
authored
CLN: to_dense->np.asarray (pandas-dev#32545)
1 parent a3985f8 commit 3e1275e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/arrays/categorical.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,8 @@ def fillna(self, value=None, method=None, limit=None):
17281728
# pad / bfill
17291729
if method is not None:
17301730

1731-
values = self.to_dense().reshape(-1, len(self))
1731+
# TODO: dispatch when self.categories is EA-dtype
1732+
values = np.asarray(self).reshape(-1, len(self))
17321733
values = interpolate_2d(values, method, 0, None, value).astype(
17331734
self.categories.dtype
17341735
)[0]

0 commit comments

Comments
 (0)