Skip to content

Commit 2094575

Browse files
committed
Fix
1 parent 3d32187 commit 2094575

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xarray/core/formatting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from xarray.core.duck_array_ops import array_equiv, astype
2020
from xarray.core.indexing import MemoryCachedArray
2121
from xarray.core.options import OPTIONS, _get_boolean_with_default
22-
from xarray.core.pycompat import array_type, to_duck_array
22+
from xarray.core.pycompat import array_type, to_duck_array, to_numpy
2323
from xarray.core.utils import is_duck_array
2424

2525
if TYPE_CHECKING:
@@ -121,7 +121,8 @@ def last_item(array):
121121
return []
122122

123123
indexer = (slice(-1, None),) * array.ndim
124-
return np.ravel(to_duck_array(array[indexer])).tolist()
124+
# to_numpy since dask doesn't support tolist
125+
return np.ravel(to_numpy(array[indexer])).tolist()
125126

126127

127128
def calc_max_rows_first(max_rows: int) -> int:

0 commit comments

Comments
 (0)