Python debug
摘要:1、struct.unpack的返回值是一个tuple,所以不能赋值给某一个元素:ValueError: setting an array element with a sequence.
阅读全文
posted @
2022-08-30 11:29
clayyjh
阅读(25)
推荐(0) 编辑
numpy 数组 浅拷贝 地址
摘要:对于numpy数组: import numpy as np a = np.array([1,2,3,4]) b = a[0:2] b[0] = np.sum(a[:])/4 修改b[0]的值会改变a的值,原因:https://blog.csdn.net/AManFromEarth/article/d
阅读全文
posted @
2022-08-29 19:35
clayyjh
阅读(23)
推荐(0) 编辑