06 2020 档案

摘要:import re import re x1='I' x2='she' x='I will meet you.' print(re.search(x1,x)) #在x中寻找x1 print(re.search(x2,x)) print(re.search(r"m[A-Z]t", "I met you 阅读全文
posted @ 2020-06-23 15:53 熊猫blue 阅读(140) 评论(0) 推荐(0)
摘要:删除np.array多行: x = np.array([[1,2,3],[4,5,6],[7,8,9]]) x = np.delete(x,[1,2], axis = 0) #删除第1,2行 print(x) 在np.array后面加若干行: c=np.array([[1,1],[2,2],[3,3 阅读全文
posted @ 2020-06-22 21:57 熊猫blue 阅读(167) 评论(1) 推荐(1)
摘要:repeat import torch x = torch.tensor([1, 2, 3]) print(x) print(x.repeat(4, 2)) print(x.repeat(4, 2, 1)) permute: 将对应维度的张量置换,有点numpy.transpose()的意思,具体可 阅读全文
posted @ 2020-06-08 11:00 熊猫blue 阅读(173) 评论(0) 推荐(0)
摘要:参考:https://wongmz.top/2019/08/09/Matplotlib%E5%85%A5%E9%97%A8/ 阅读全文
posted @ 2020-06-05 01:40 熊猫blue 阅读(90) 评论(0) 推荐(0)