Skip to content

Commit 3c9217e

Browse files
authored
Skip call to .tolist() when creating pd.Index (#10619)
1 parent 6d73f01 commit 3c9217e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/core/coordinates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def to_index(self, ordered_dims: Sequence[Hashable] | None = None) -> pd.Index:
177177

178178
# compute the cartesian product
179179
code_list += [
180-
np.tile(np.repeat(code, repeat_counts[i]), tile_counts[i]).tolist()
180+
np.tile(np.repeat(code, repeat_counts[i]), tile_counts[i])
181181
for code in codes
182182
]
183183
level_list += levels

0 commit comments

Comments
 (0)