摘要: 1、Can't broadcast input array from shape (3,1) into shape (3,) resolution: V[k:m,k] = v; v has shape (3,1), but the target is (3,). k:m is a 3 term sl 阅读全文
posted @ 2018-09-15 19:58 何弈 阅读(198) 评论(0) 推荐(0)
摘要: 1、 df=DataFrame([{‘A’:’11’,’B’:’12’},{‘A’:’111’,’B’:’121’},{‘A’:’1111’,’B’:’1211’}]) print df.columns.size#列数 2 print df.iloc[:,0].size#行数 3 print df. 阅读全文
posted @ 2018-09-13 19:09 何弈 阅读(32052) 评论(0) 推荐(0)
摘要: 查看centOS 版本 cat /etc/redhat-release 1,复制粘贴文件 cp [选项] 源文件或目录 目标文件或目录 2,剪切粘贴文件 mv [选项] 源文件或目录 目标文件或目录 3,删除文件 rm 文件 慎用 rm -rf 以下为 linux下文件的复制、移动与删除:参考 ht 阅读全文
posted @ 2018-09-10 21:46 何弈 阅读(795) 评论(0) 推荐(0)
摘要: 1、cmd窗口输入-guide > 打开.fig文件 2、查看SPM源代码: 2、matlab中如何改x,y轴以及图例上字体大小 1) x,y轴 整个轴上面就一个设定字符 xlabel('\Delta [yesno^{-2}]','FontName','Times New Roman','FontS 阅读全文
posted @ 2018-09-06 00:04 何弈 阅读(630) 评论(0) 推荐(0)
摘要: ordered_data = np.load('ordered_data_just_TD_mae.npy')results = pd.Series(np.squeeze(np.load('results_just_TD_mae.npy')))sigma = pd.Series(np.squeeze( 阅读全文
posted @ 2018-09-05 20:53 何弈 阅读(422) 评论(0) 推荐(0)
摘要: merage# pandas提供了一个类似于关系数据库的连接(join)操作的方法<Strong>merage</Strong>,可以根据一个或多个键将不同DataFrame中的行连接起来,语法如下: 1 2 3 merge(left, right, how='inner', on=None, le 阅读全文
posted @ 2018-09-03 19:41 何弈 阅读(463) 评论(0) 推荐(0)
摘要: 一、Inf 和 NAN处理 lnf: 无穷大值,可以用islnf或者isfinite函数处理, 比如:X(find(isinf(X) == 1)) = 0; NAN:不是一个数字,可以用isnan函数来处理,比如:X(find(isnan(X) == 1)) = 0; 或者: 类似于这种处理 mn( 阅读全文
posted @ 2018-09-03 01:09 何弈 阅读(2347) 评论(0) 推荐(0)
摘要: from numpy import * a1 =[[1,2,3],[4,5,6]] #列表 print('a1 :',a1) #('a1 :', [[1, 2, 3], [4, 5, 6]]) a2 = array(a1) #列表 > 数组 print('a2 :',a2) #('a2 :', ar 阅读全文
posted @ 2018-08-30 15:46 何弈 阅读(704) 评论(0) 推荐(0)
摘要: 直接看例子: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 解析: loc 在index的标签上进行索引,范围包括start和en 阅读全文
posted @ 2018-08-30 01:28 何弈 阅读(728) 评论(0) 推荐(0)
摘要: [python] view plain copy <code class="language-python">import operator from functools import reduce a = [[1,2,3], [4,6], [7,8,9,8]] print(reduce(opera 阅读全文
posted @ 2018-08-30 00:48 何弈 阅读(8867) 评论(0) 推荐(0)
你好