@@ -261,13 +261,12 @@ def _get_selection(self, ds, *args):
261
261
262
262
indexer = pyfive .OrthogonalIndexer (* args , array )
263
263
out_shape = indexer .shape
264
- out_dtype = ds .dtype
265
264
#stripped_indexer = [(a, b, c) for a,b,c in indexer]
266
265
drop_axes = indexer .drop_axes and keepdims
267
266
268
267
# we use array._chunks rather than ds.chunks, as the latter is none in the case of
269
268
# unchunked data, and we need to tell the storage the array dimensions in this case.
270
- return self ._from_storage (ds , indexer , array ._chunks , out_shape , out_dtype , compressor , filters , drop_axes )
269
+ return self ._from_storage (ds , indexer , array ._chunks , out_shape , dtype , compressor , filters , drop_axes )
271
270
272
271
def _from_storage (self , ds , indexer , chunks , out_shape , out_dtype , compressor , filters , drop_axes ):
273
272
method = self .method
@@ -303,7 +302,9 @@ def _from_storage(self, ds, indexer, chunks, out_shape, out_dtype, compressor, f
303
302
# Because we do this, we need to read the dataset b-tree now, not as we go, so
304
303
# it is already in cache. If we remove the thread pool from here, we probably
305
304
# wouldn't need to do it before the first one.
306
- ds ._get_chunk_addresses ()
305
+
306
+ if ds .chunks is not None :
307
+ ds ._get_chunk_addresses ()
307
308
with concurrent .futures .ThreadPoolExecutor (max_workers = self ._max_threads ) as executor :
308
309
futures = []
309
310
# Submit chunks for processing.
0 commit comments