python 一行代碼

矩陣轉爲 0 1 矩陣dom

大於 0.2 是 1,不然是 0spa

import numpy as np

a = np.random.rand(5,3)
print(a)
b = np.int64(a>0.2)
print(b)
相關文章
相關標籤/搜索