摘要:
例2.2.2 a=[] with open('data2_2.txt') as f: for (i, s) in enumerate(f): a.append([s.count('a'), s.count('c'), s. count('g'), s. count('t')]) b=np. arra
阅读全文
posted @ 2024-10-27 23:33
犬塚米灵
阅读(3)
推荐(0)
编辑
摘要:
习题3.2 import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['Ti
阅读全文
posted @ 2024-10-27 23:32
犬塚米灵
阅读(0)
推荐(0)
编辑
摘要:
习题4.3 import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as plt plt.rcParams['font.
阅读全文
posted @ 2024-10-27 23:32
犬塚米灵
阅读(2)
推荐(0)
编辑
摘要:
习题5.4 import cvxpy as cp import numpy as np import pandas as pd from scipy.optimize import minimize import sympy as sp sp.init_printing(use_unicode=Tr
阅读全文
posted @ 2024-10-27 23:32
犬塚米灵
阅读(1)
推荐(0)
编辑
摘要:
例题6.10 import networkx as nx L=[(1,2,20),(1,5,15),(2,3,20),(2,4,60),(2,5,25),(3,4,30),(3,5,18),(5,6,15)] G=nx.Graph();G.add_nodes_from(np.arange(1,7))
阅读全文
posted @ 2024-10-27 23:32
犬塚米灵
阅读(5)
推荐(0)
编辑