Is there a function in a Python library that can assign a value to an element based on evaluation of the surrounding neighborhood?

前端 未结 0 647
夕颜
夕颜 2020-12-13 08:02

This question is best asked by example. Suppose that I have a 2D array

[[1, 1, 2],
 [1, 2, 1],
 [1, 1, 1]]

I need a function that could take

相关标签:
回答
  • 消灭零回复
提交回复
热议问题