自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 资源 (1)
  • 收藏
  • 关注

转载 numpy库矩阵运算

python的numpy库提供矩阵运算的功能,因此我们在需要矩阵运算的时候,需要导入numpy的包。1.numpy的导入和使用from numpy import *;#导入numpy的库函数import numpy as np; #这个方式使用numpy的函数时,需要以np.开头。2.矩阵的创建由一维或二维数据创建矩阵>>> from numpy import *...

2019-03-01 18:15:51 447

原创 np.log()

以10为底np.log10(x)以e为底np.log(x)

2019-02-21 18:31:03 24190

原创 tf.one_hot()

one_hot(indices, depth, on_value=None, off_value=None, axis=None, dtype=None, name=None) Returns a one-hot tensor.indices表示输入的多个数值,通常是矩阵形式;depth表示输出的尺寸on_value为表示原输入的数值,默认值为1,one-hot数据的其他位用of...

2019-02-21 16:04:17 233

转载 reshape函数

首先,最基本的,比如arr = [1,2,3,4,5,6,7,8,9] 一个一维的list,长度为9现在,我想把arr变成一个3*3的矩阵,这就可以用的reshape了,两个方法,第一arr.reshape(3,3)这个很好理解,不多说,重点看第二个方法arr.reshape(-1,3)这样也可以把arr变成3*3的矩阵,这个-1代表的意思就是,我不知道可以分成多少行,但是我的需...

2019-02-14 14:25:56 6204

原创 python模式匹配找出字符串中的信息

import retext = """3843700 "4c4e276567929c747ab6709b" null "12345678” zzzzz"""#用户id,微信号,null,QQ号,没用的字符串pattern = re.compile(r'(.*?) +(.*?) +null +(.*?) +(.*?).*', re.

2019-02-11 17:33:36 689

判断N点中是否存在三个点共线

题目描述 Given points on a 2D plane, judge whether there're three points that locate on the same line. 输入格式 The number of test cases T(1≤T≤10) appears in the first line of input. Each test case begins with the number of points N(1≤N≤100). The following N lines describe the coordinates (xi,yi) of each point, in accuracy of at most 3 decimals. Coordinates are ranged in [−104,104]. 输出格式 For each test case, output Yes if there're three points located on the same line, otherwise output No.

2019-01-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除