Scan-o-Matic / scanomatic

Scanomatic
GNU General Public License v3.0
10 stars 4 forks source link

Possible improvement for points_in_circle #419

Closed OshinoMoumou closed 3 years ago

OshinoMoumou commented 3 years ago

Greetings! I noticed that method points_in_circle referred a StackOverflow post, while a recent comment to it mentioned that to avoid edge effects (e.g. negative or out of range indices) you can add the following condition if (i >= 0 and i < rows) and (j>=0 and j < cols): one the line before yield arr[i][j] in points_in_circle. I'm trying to learn the usefulness of such small updates on StackOverflow. Would this comment help improve your code? I understand that such improvement might not be helpful in real life situation. In that case, do you think this comment can help promote future projects (for example, when the code were reused somewhere else)? I'll really appreciate it if you could kindly give me some feedback or suggestions. Thank you very much for your time. Have a nice day!

local-minimum commented 3 years ago

Hi!

Thanks for reporting a possible improvement. Unfortunately, I don't believe it is applicable to our case here and regrettably this project has not seen any development for a couple years as university funding for maintaining application code is notoriously hard to secure. As to your question about helpfulness, I think you might find more success in younger academic projects or projects with more recent activity in general.

Have a nice day!