#NUM

mysql中set和enum使用(简单介绍)

  在创建表时,就指定SET类型的取值范围。属性名SET('值1','值2','值3'...,'值n')  其中,“属性名”参数指字段的名称;“值n”参数表示列表中的第n个值,这些值末尾的空格将会被系统直接删除。其基本形式与ENUM类型一样。SET类型的值可以取列表中的一...

java 枚举类型enum

Java 中的枚举类型采用关键字enum 来定义,从jdk1.5才有的新类型,所有的枚举类型都是继承自Enum 类型。要了解枚举类型,建议大家先打开jdk 中的Enum 类简单读一下,这个类里面定义了很多protected 方法,比如构造函数,如果要使用这些方...
代码星球 代码星球·2020-08-19

java反射 反射构造函数 报 wrong number of arguments 错误

packagecom;importjava.lang.reflect.Constructor;publicclassPerson{publicPerson(){}publicPerson(Stringname){this.name=name;}publicPerson(intage){this.age=age;}pub...

Java Enum 枚举类的values方法

Enum类和enum关键字定义的类型都有values方法,但是点进去会发现找不到这个方法。这是因为java编译器在编译这个类(enum关键字定义的类默认继承java.lang.Enum)的时候自动插入了一条static的方法values。在官方文档中有说明。文档地址:https://docs.oracle.com/ja...

几种查询方法(lambda Linq Enumerable静态类方式)

1.需要一个数据源类:usingSystem;usingSystem.Collections.Generic;namespaceLinq{publicclassStudent{publicintId{get;set;}publicstringName{get;set;}publicintAge{get;set;}}pu...

numpy.linalg.eig

1、转置对于二维数组有用,对一位数组无效2、理解特征值和特征向量的对应关系a=np.array([[1,2,3],[4,5,6],[7,8,9]])aOut[27]:array([[1,2,3],[4,5,6],[7,8,9]])w,v=LA.eig(a)wOut[29]:array([1.61168440e+01,-...
代码星球 代码星球·2020-08-15

numpy.concatenate

importnumpyasnpa=np.array([[1,2],[3,4]])a.shapeOut[3]:(2,2)b=np.array([[5,6]])b.shapeOut[5]:(1,2)np.concatenate((a,b))Out[6]:array([[1,2],[3,4],[5,6]])c=np.conc...
代码星球 代码星球·2020-08-15

numpy.percentile

http://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.htmlnumpy.percentile(a,q,axis=None,out=None,overwrite_input=False,interpolation='linear',ke...
代码星球 代码星球·2020-08-15

numpy.matlib.randn(标准正态分布)

#网址http://docs.scipy.org/doc/numpy/reference/generated/numpy.matlib.randn.html#numpy.matlib.randnnumpy.matlib.randn(*args)[source]Returnarandommatrixwithdatafro...

numpy.ones_like(a, dtype=None, order='K', subok=True)返回和原矩阵一样形状的1矩阵

Returnanarrayofoneswiththesameshapeandtypeasagivenarray.Parameters:a :array_likeTheshapeanddata-typeof a definethesesameattributesofthereturnedar...

numpy.zeros(shape, dtype=float, order='C')

Returnanewarrayofgivenshapeandtype,filledwithzeros.Parameters:shape :intorsequenceofintsShapeofthenewarray,e.g., (2, 3) or 2.dtype ...

numpy.ones(shape, dtype=None, order='C')

 Returnanewarrayofgivenshapeandtype,filledwithones.Parameters:shape :intorsequenceofintsShapeofthenewarray,e.g., (2, 3) or 2.dtype...

numpy.mean和numpy.random.multivariate_normal(依据均值和协方差生成数据,提醒:计算协方差别忘了转置)

>>importnumpyasnp>>>A1_mean=[1,1]>>>A1_cov=[[2,.99],[1,1]]>>>A1=np.random.multivariate_normal(A1_mean,A1_cov,10)#依据指定的均值和协方差生成数...

numpy和matlab计算协方差矩阵的不同(matlab是标准的,numpy相当于转置后计算)

matlab是标准的,numpy相当于转置后计算>>x=[2,0,-1.4;2.2,0.2,-1.5;2.4,0.1,-1;1.9,0,-1.2]x=2.0000  0      -1.40002.2000  ...
首页上一页...351352353354355...下一页尾页