Skip to content

Commit

Permalink
CLN: to_dense->np.asarray (pandas-dev#32545)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Mar 9, 2020
1 parent a3985f8 commit 3e1275e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,8 @@ def fillna(self, value=None, method=None, limit=None):
# pad / bfill
if method is not None:

values = self.to_dense().reshape(-1, len(self))
# TODO: dispatch when self.categories is EA-dtype
values = np.asarray(self).reshape(-1, len(self))
values = interpolate_2d(values, method, 0, None, value).astype(
self.categories.dtype
)[0]
Expand Down

0 comments on commit 3e1275e

Please sign in to comment.