摘要:
np.pad()用来在numpy数组的边缘进行数值填充,例如CNN网络常用的padding操作 1.语法结构 np.pad(array,pad_width,mode,**kwargs) # 返回填充后的numpy数组 array:要填充的numpy数组【要对谁进行填充】 pad_width:每个轴要 阅读全文
摘要:
用法说明:[以下2种都可以] import matplotlib as mpl mpl.rcParams["xxx"] = "xxxxx" from matplotlib import pyplot as plt plt.rcParams["xxx"] = "xxxxx" 一、什么是rc配置 mat 阅读全文
摘要:
plt.axis(‘square’)作图为正方形,并且x,y轴范围相同,即y m a x − y m i n = x m a x − x m i n y_{max}-y_{min} = x_{max}-x_{min}ymax−ymin=xmax−xmin plt.axis(‘equal’)x 阅读全文
摘要:
np.where(condition, [x, y])官方解释看的不是很懂,研究各种材料后,总结如下: 一、np.where(condition, x, y) 1.返回值是一个和condition的shape相同的numpy 数组 2.当满足条件condition时,返回值中的元素从x中取,否则从y 阅读全文
摘要:
区别: 创建numpy数组时,np.array()会copy一份; 创建numpy数组时,np.asarray()也会copy一份,但是如果数据源是ndarray类型时,不会copy 举例: 1. 数据源a是数组ndarray时,array仍然会copy出一个副本,占用新的内存,但asarray不会 阅读全文
摘要:
file -- settings -- editor -....,如下图所示 阅读全文
摘要:
enumerate() 函数用于将一个可遍历的数据对象(如列表、元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在 for 循环当中。 举例: a = [2, 5, 10, -1, 3] for i, value in enumerate(a): print(i, value) 代码 阅读全文
摘要:
当使用 import sklearn sklearn.linear_model.LogisticRegression() 报如下错误 AttributeError: module 'sklearn' has no attribute 'linear_model' 修改为: from sklearn. 阅读全文
摘要:
1. 安装 pip install jupyter (安装jupyter notebook) pip install jupyterlab (安装jupyter lab) 2. 启动 启动jupyter notebook 地址栏输入 localhost:8888,并输入token后面的密码 启动ju 阅读全文
摘要:
比较早期的2G网络上网是通过CSD(Circuit Switch Data,电路数据交换)方式进行的,但是CSD是基于电路交换的,在应对以IP封包为主的internet业务时并不高效,因此GSM在后续的演进中引入了GPRS技术 BTS(Base Transceiver Station,基站)分布在我 阅读全文