Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: only integer scalar arrays can be converted to a scalar index #46

Closed
glescki opened this issue Dec 20, 2019 · 3 comments
Closed
Assignees

Comments

@glescki
Copy link

glescki commented Dec 20, 2019

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
Copy link

isukrit commented Jan 28, 2020

Same error, different dataset.

@roman-kh
Copy link
Member

@AlexeyKozhevin @akoryagin Guys, please, comment

@AlexeyKozhevin
Copy link

Could you print pos and self.index in subset_by_pos method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants