TypeError: only integer scalar arrays can be converted to a scalar index
glescki opened this issue · 3 comments
glescki commented
Hi,
I'm following the first tutorial (RadIO.I.ipynb) and I always seem to get the same error. I've tryed with different data than from the Luna dataset and I get the same error.
After running this line:
batch = (luna_dataset >> preprocessing).next_batch(batch_size=3, shuffle=False) # execution starts when you call next_batch
I get:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-14-2649f0c8a285> in <module>()
----> 1 batch = (luna_dataset >> preprocessing).next_batch(batch_size=3, shuffle=False) # execution starts when you call next_batch
6 frames
/usr/local/lib/python3.6/dist-packages/radio/batchflow/batchflow/dsindex.py in subset_by_pos(self, pos)
84 def subset_by_pos(self, pos):
85 """ Return subset of index by given positions in the index. """
---> 86 return self.index[pos]
87
88 def create_subset(self, index):
TypeError: only integer scalar arrays can be converted to a scalar index
I'm running the notebook on google colab, but I also get the same error when running in my laptop.
What I am doing wrong here?
isukrit commented
Same error, different dataset.
roman-kh commented
@AlexeyKozhevin @akoryagin Guys, please, comment
AlexeyKozhevin commented
Could you print pos
and self.index
in subset_by_pos
method?