Replacing numpy array elements with stacked masks

后端 未结 0 1060
孤街浪徒
孤街浪徒 2021-02-20 03:02

Consider some array arr and advanced indexing mask mask:

import numpy as np

arr = np.arange(4).reshape(2, 2)
mask = A < 2

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