摘要: 在安装ggraph的时候总是提示:package ‘igraph’ had non-zero exit status install.packages("igraph", type = "binary") 阅读全文
posted @ 2023-11-02 13:13 xinkevinzhang 阅读(703) 评论(0) 推荐(0)
摘要: 因为jupyter notebook 通过anaconda或mini anaconda安装,启动jupyter notebook 记得通过conda启动,从windows shell终端无法打开。 阅读全文
posted @ 2023-01-20 17:46 xinkevinzhang 阅读(64) 评论(0) 推荐(0)
摘要: python numpy数据保存csv np.savetxt('all_data_6.csv', all_data_6, delimiter = ',') np.savetxt('all_data_8.csv', all_data_6, delimiter = ',') 读入csv 为np.arra 阅读全文
posted @ 2023-01-15 08:37 xinkevinzhang 阅读(231) 评论(0) 推荐(0)
摘要: #在写python脚本时遇到AttributeError: 'NoneType' object has no attribute 'append' a=[] b=[1,2,3,4] a = a.append(b) 执行一次后发现a的类型变为了NoneType。 下次执行时就会出现如题所示的错误。 把 阅读全文
posted @ 2023-01-09 07:01 xinkevinzhang 阅读(664) 评论(0) 推荐(0)
摘要: Jupyter notebook如何打印多个结果 from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity='all' InteractiveShell.ast 阅读全文
posted @ 2023-01-07 07:31 xinkevinzhang 阅读(170) 评论(0) 推荐(0)
摘要: pyplot, Matplotlib 软件包中子包,提供了一个类似MATLAB的绘图框架。支持 Python 语言。 gridspace:A grid layout to place subplots within a figure.在同一幅图中画多个子图。 class matplotlib.gri 阅读全文
posted @ 2022-12-21 10:51 xinkevinzhang 阅读(34) 评论(0) 推荐(0)
摘要: 作用:是控制绘图不显示 在导入matplotlib库后,且在matplotlib.pyplot库被导入前加“matplotlib.use(‘agg’)”语句。 注意matplotlib.use('agg')必须在本句执行import matplotlib.pyplot as plt前运行 阅读全文
posted @ 2022-12-21 09:07 xinkevinzhang 阅读(259) 评论(0) 推荐(0)
摘要: 汉明距离是使用在数据传输差错控制编码里面的,汉明距离是一个概念,它表示两个(相同长度)字符串对应位置的不同字符的数量,我们以d(x,y)表示两个字x,y之间的汉明距离。对两个字符串进行异或运算,并统计结果为1的个数,那么这个数就是汉明距离。 You are given two strings of 阅读全文
posted @ 2022-12-09 07:43 xinkevinzhang 阅读(242) 评论(0) 推荐(0)
摘要: Introducing magrittr Stefan Milton Bache November, 2014 Abstract The magrittr (to be pronounced with a sophisticated french accent) package has two ai 阅读全文
posted @ 2022-12-08 15:05 xinkevinzhang 阅读(31) 评论(0) 推荐(0)
摘要: A Forward-Pipe Operator for R #1.基本用法 x %>% f 等价于 f(x) x %>% f(y) 等价于 f(x, y) x %>% f %>% g %>% h 等价于 h(g(f(x))) x %>% f(y, .) 等价于 f(y, x) x %>% f(y, 阅读全文
posted @ 2022-12-08 11:36 xinkevinzhang 阅读(559) 评论(0) 推荐(0)