x = np.random.randn(4, 4)print(x)A = np.where(x>0, 2, -2)print(A) ... python zip函数/np.where找到满足条件的元素位置/numpy与list转换/eval.
確定! 回上一頁