a = np.arange(9).reshape((3,3)) 变换维度 np.max(a) 全局最大,也可以加参数,找某个维度最大的 print(np.max(a,axis=0)) #每列最大 print(np.max(a,axis=1)) #每行最大 print(np.where(a==np.m ...
分类:
其他好文 时间:
2019-09-12 09:44:01
阅读次数:
85
题目描述 Farmer John has been having trouble making his plants grow, and needs your help to water them properly. You are given the locations of N raindrop ...
分类:
其他好文 时间:
2019-09-09 22:52:36
阅读次数:
104
生成x为0~1区间内10000个动态点 box on;axis([0 1 0 100]);hold onm=0;a=0;b=1;for i=1:100x = a + (b-a).*rand(100,1);m=m+1;y=log(x);plot(x,m,'r.')pause(0.01)frame=ge ...
分类:
其他好文 时间:
2019-09-08 21:56:39
阅读次数:
90
本人较懒,故间断更新下常用的tf函数以供参考: 一、tf.reduce_sum( ) reduce_sum( ) 个人理解是降维求和函数,在 tensorflow 里面,计算的都是 tensor,可以通过调整 axis 的维度来控制求和维度。 参数: input_tensor:要减少的张量.应该有数 ...
分类:
其他好文 时间:
2019-09-03 21:58:40
阅读次数:
122
本次使用木东居士提供数据案例,验证数据分布等内容,参考链接:https://www.jianshu.com/p/6522cd0f4278,先感谢上面两位。 只贴了代码。。。结果图片没得了 ...
分类:
编程语言 时间:
2019-09-01 23:35:39
阅读次数:
115
#numpy是个外部库,要先安装,再导入,再使用import numpy as np #创建一个ndarray数组# arr=([1,2,3,4,5],[4,5,6,7,8])# nparr=np.array(arr)# print(nparr)## nparr2=np.array([1.0,2,3 ...
分类:
其他好文 时间:
2019-09-01 12:41:12
阅读次数:
64
python中broadcast机制非常实用,在python中的广播机制其实很简单,我们看两个例子。 ...
分类:
编程语言 时间:
2019-08-24 15:36:01
阅读次数:
126
1.Pandas对数据某一列删除 2.Pandas之修改列名 3.pandas操作csv多个列,生成新的列 4.pandas去除文件中的重复项 subset : column label or sequence of labels, optional 用来指定特定的列,默认所有列 keep : {‘ ...
分类:
其他好文 时间:
2019-08-23 13:48:16
阅读次数:
197
1. tf.unstack(number, axis=0) 表示对数据进行拆分 对数据进行合理的解读 ...
分类:
其他好文 时间:
2019-08-20 23:46:30
阅读次数:
98