Hi Larry,

After some sleuthing, I think I’ve found the issue. Since you are using Python 3, the division in line j = idx / size[1] is resulting in j being a float, and when you use int(j*h) it is turning it into an integer differently than would have happened in the initial division line. Try

j = idx // size[1] to see what happens there. I believe that should fix your issue. I don’t have a Python 3 environment myself to test it on, but when I change the division to make j a float I get the same error that you do.

PhD. Interests include Deep (Reinforcement) Learning, Computational Neuroscience, and Phenomenology.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store