摘要:
https://www.runoob.com/python/os-listdir.html 阅读全文
摘要:
import numpy as np a = np.zeros([4,3]) print('前a:', a) a[0:3, 1] = 1 # 数组行(0,1,2)和列(1)的值变为1 print('后a:', a) 结果: 前a: [[0. 0. 0.] [0. 0. 0.] [0. 0. 0.] 阅读全文
摘要:
版权声明:本文为CSDN博主「象在舞」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/gdkyxy2013/article/details/80495353 阅读全文
摘要:
版权声明:本文为CSDN博主「雷格西雷狗子」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/weixin_45556441/article/details/110847939 阅读全文
摘要:
import numpy as np a = np.floor(2.3) # 向下取整 b = np.floor([1.6, -2.5]) print('a:', a) print('b:', b) a: 2.0 b: [ 1. -3.] import numpy as np c = np.ceil 阅读全文
摘要:
import numpy as np a = np.zeros((2,3), dtype=int) print(a) b = np.ones_like(a, dtype=int) print(b) 结果: a: [[0 0 0] [0 0 0]] b: [[1 1 1] [1 1 1]] 阅读全文
摘要:
import numpy as np a = np.array([i for i in range(5)]) b = np.array([i for i in range(5, 10)]) print('a:', a) print('b:', b) c = np.stack([a,b], axis= 阅读全文