11 2020 档案

摘要:1.numpy array是list一个很好的补充,numpy array可以进行数组的整体操作。 a=np.array([1,2,3,4,5]) b=np.array([1,2,3,4,5]) c=a/b 2.numpy构造数组子集的操作很方便,并进行数据统计。 import numpy as n 阅读全文
posted @ 2020-11-23 08:38 whispe 阅读(80) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*- """ Created on Tue Jun 9 11:18:48 2020 @author: 13549 """ from random import random #第一阶段 def printIntro(): print("模拟两个选手A和B的羽 阅读全文
posted @ 2020-11-22 14:37 whispe 阅读(88) 评论(0) 推荐(0)
摘要:import jieba txt = open("聊斋志异.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) counts = {} for word in words: if len(word) == 1: continue e 阅读全文
posted @ 2020-11-15 11:35 whispe 阅读(97) 评论(0) 推荐(0)