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

AttributeError: 'range' object has no attribute 'remove' #6

Open
jongsukchoi opened this issue Oct 23, 2018 · 7 comments
Open

AttributeError: 'range' object has no attribute 'remove' #6

jongsukchoi opened this issue Oct 23, 2018 · 7 comments

Comments

@jongsukchoi
Copy link

Hi~
I'm faced with problem in extract_batch_size.

_unsampled is range!! but 'range' object has no attribute 'remove'

how do I fix it?

@jongsukchoi
Copy link
Author

I fixed it

unsampled_indices = range(0, len(X_train)) ----> unsampled_indices = list(range(0, len(X_train)))

@RaghunandanVenkatesh
Copy link

Hi, This solution isn't working for me.
Anybody please help

@Snehal-Reddy
Copy link

It does work. Just make sure all the instances of unsampled_indices being initialised to range are converted to list first.

@arvindchandel
Copy link

I also faced the same issue and this solution by @Snehal-Reddy works fine.

@Maia97
Copy link

Maia97 commented Feb 8, 2021

met similar error: AttributeError: 'range' object has no attribute 'ndim'
np.array(range(x)) works, thanks above.

@bibinss
Copy link
Contributor

bibinss commented Jun 3, 2021

fixed in this PR #31

@CatPy3
Copy link

CatPy3 commented Aug 5, 2023

list = list(range(N1, N2)). Just add 'list' function

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

7 participants