filter a N-D numpy array and keep only specific elements

前端 未结 0 1468
借酒劲吻你
借酒劲吻你 2020-11-27 16:40

I\'m dealing with a large N-D numpy array. I would like to keep only those elements present in a different numpy array, and set the remaining values to 0.

for example

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