|
|
|
@ -237,6 +237,7 @@ class Sampler(BuiltinSampler):
|
|
|
|
|
|
|
|
|
|
# Indices fetcher
|
|
|
|
|
# Do not override this method!
|
|
|
|
|
# pylint: disable=missing-docstring
|
|
|
|
|
def _get_indices(self):
|
|
|
|
|
sampler_iter = iter(self)
|
|
|
|
|
ret = []
|
|
|
|
@ -246,7 +247,10 @@ class Sampler(BuiltinSampler):
|
|
|
|
|
ret.append(idx)
|
|
|
|
|
except StopIteration:
|
|
|
|
|
break
|
|
|
|
|
return np.array(ret)
|
|
|
|
|
indices = np.array(ret)
|
|
|
|
|
if indices.dtype == object:
|
|
|
|
|
raise RuntimeError("Fetched indices can not be converted to a valid ndarray.")
|
|
|
|
|
return indices
|
|
|
|
|
|
|
|
|
|
# Instance fetcher
|
|
|
|
|
# Do not override this method!
|
|
|
|
|