Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 3
    I’m voting to close this question because your code works but you are looking for a code review. Thus this question belongs on: codereview.stackexchange.com Commented Mar 10, 2021 at 11:53
  • could you share the full example of how you change k variable outside of this function? Commented Mar 10, 2021 at 13:36
  • are m and image3 numpy matrices? or lists of lists? Commented Mar 10, 2021 at 21:00
  • also, you say m is empty but do you mean it is initially a matrix of zeroes? And then progressively updated as k is increased? Commented Mar 10, 2021 at 21:08
  • 1
    answers to this question may be helpful Commented Mar 10, 2021 at 21:23