Numpy笔记
2015-08-31 · Computer
随机数
np.random.randint(5, size=(4,5)):生成整型随机矩阵;np.random.random([4,5]):0–1 均匀分布;np.random.choice(arr, size):对应 Mathematica 的 RandomChoice;np.random.permutation:随机排列。bytes 对应 Mathematica 的 ByteCount。
2015-08-31 · Computer
np.random.randint(5, size=(4,5)):生成整型随机矩阵;np.random.random([4,5]):0–1 均匀分布;np.random.choice(arr, size):对应 Mathematica 的 RandomChoice;np.random.permutation:随机排列。bytes 对应 Mathematica 的 ByteCount。