python里的一些代码

C = np.append(C, np.asarray(np.where(S[ind])).reshape(-1))  # np.where()返回S[ind]的非0下标。
l = np.argwhere(y == Cl).reshape(-1)
diferenca = S - np.matlib.repmat(aux, Nl, 1)    # np.matlib.repmat(a, m,n) 将a沿着纵轴复制m次,横轴复制n次
D = sklearn.metrics.pairwise.pairwise_distances(X_l, X_m)

Tqdm 是 Python 进度条库,可以在 Python 长循环中添加一个进度提示信息用法:tqdm(iterator)

from tqdm import tqdm

for i in tqdm(range(100)):  
    time.sleep(0.01)
发布了34 篇原创文章 · 获赞 17 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_39393430/article/details/89815961
今日推荐