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

Error, when I start data.py #79

Open
SlimRG opened this issue Oct 11, 2018 · 3 comments
Open

Error, when I start data.py #79

SlimRG opened this issue Oct 11, 2018 · 3 comments

Comments

@SlimRG
Copy link

SlimRG commented Oct 11, 2018

`(base) C:\Users\BBCCA\Desktop\ultrasound-nerve-segmentation-master>python data.py

Traceback (most recent call last):
-File "data.py", line 92, in
----create_train_data()
--File "data.py", line 19, in create_train_data
----imgs = np.ndarray((total, image_rows, image_cols), dtype=np.uint8)

TypeError: 'float' object cannot be interpreted as an integer`

I have Python 3.6.6 x64 (Anaconda For Windows)

@SlimRG
Copy link
Author

SlimRG commented Oct 11, 2018

Попробуйте заменить:

total = len(images) / 2
на (целочисленное деление):

total = len(images) // 2

SlimRG added a commit to SlimRG/ultrasound-nerve-segmentation that referenced this issue Oct 11, 2018
@giemmecci
Copy link

This solved the issue for me:

total = int(len(images) / 2)

@SlimRG
Copy link
Author

SlimRG commented Oct 12, 2018

Difference?

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

2 participants