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

question about array typecode of data_image #16

Open
xiaozhaolhg opened this issue Aug 2, 2017 · 1 comment
Open

question about array typecode of data_image #16

xiaozhaolhg opened this issue Aug 2, 2017 · 1 comment

Comments

@xiaozhaolhg
Copy link

Hello,
I ran into a problem when running JPG-PNG-to-MNIST-NN-Format/convert-images-to-mnist-format.py:

Traceback (most recent call last):
File "/Users/shhgliu/git/JPG-PNG-to-MNIST-NN-Format/convert-images-to-mnist-format.py", line 35, in
data_image.append(pixel[y,x])
TypeError: an integer is required

after checking the code, I find the root cause is the typecode of data_image is 'B', which mean it only contains integer, however, at line 35, data_image.append(pixel[y,x]), the expression "pixel[y,x]" returns an array object.

so could you please help to check it? thanks!

@ArtemGuy
Copy link

ArtemGuy commented Mar 6, 2018

Your images in grayscale or not?

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