我想對布爾 Numpy 數組的整個列/行應用NOT操作。Numpy 可以做到這一點嗎?matrix = np.array([[False for i in range(3)] for j in range(2)])# Initial# [False, False, False]# [False, False, False]matrix[:,1].not() # Something like this# After not operation on column 1# [False, True, False]# [False, True, False]
添加回答
舉報
0/150
提交
取消