我有一个二维numpy数组(uint16),如何将某个障碍(比如255)上的所有值截断到该障碍?其他值必须保持不变.使用嵌套循环似乎是无效的和笨拙的.
python numpy
numpy ×1
python ×1