python中一些函数的使用记录

python中一些函数的使用记录

等差数列创建函数:
numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None)
用途:返回在[start,stop]区间内均匀间隔的数字
num:生成的样本数(默认是50)
endpoint:如果是真,则一定包括stop,如果为False,一定不会有stop
retstep:如果是真,返回 (数列, 等差),如果是False,仅返回数组
dtype:输出array的类型
在这里插入图片描述
numpy中的内置dtype:
在这里插入图片描述
int 16,int32,int64区别
Int16, 等于short, 占2个字节. -32768 32767
Int32, 等于int, 占4个字节. -2147483648 2147483647
Int64, 等于long, 占8个字节. -9223372036854775808 9223372036854775807

猜你喜欢

转载自blog.csdn.net/weixin_38267508/article/details/83386051