摘要:
// test the throw #include<iostream> using namespace std; void func() { cout << "generate exception" << endl; throw 5; } int main() { try{ func(); } c 阅读全文
posted @ 2020-03-10 09:24
看星星的派大星
阅读(634)
评论(0)
推荐(0)
摘要:
自然数 : natural number 正整数 : positive integer 负整数 : negtive integer 整数 : integer 有理数 : rational number 无理数 :irrational number 实数 : real number 阅读全文
posted @ 2020-03-10 09:12
看星星的派大星
阅读(2116)
评论(0)
推荐(0)
摘要:
np.array[rang(10)] >生成数组,类型已变 a.dtype >查类型 np.arrange[] > 相当于range[] np.round(a,2) >相当于round() 取两位小数 a.astype(int32) >改变数据的类型 np.array(range(12),type 阅读全文
posted @ 2020-03-09 08:54
看星星的派大星
阅读(98)
评论(0)
推荐(0)
摘要:
对于成倍数增长的数列,几何平均数更能代表最中间的数,因为算数平均数会被极端数值拉大,已经不是最中间的数了。 比如 2 4 8 16 38 这几个数字的算数平均数为 约为12。 而几何平均数为8 也就数说 (a+b)/2 >= (ab)^0.5 > 源于 (a+b)^2 >= 2ab 阅读全文
posted @ 2020-03-09 08:45
看星星的派大星
阅读(1182)
评论(0)
推荐(0)
摘要:
打开Rstudio 然后点击tools 然后点击globle option是 然后点击code 然后点击saving 将default text coding 改为utf-8 阅读全文
posted @ 2020-03-08 21:48
看星星的派大星
阅读(679)
评论(0)
推荐(0)
摘要:
# test the skewness 以及峰度 library(moments) x <- rnorm(100,0,1) # 产生100均值为0, 标准差为1 的正太分布随机数 x <- rnorm(100,5,3) skewness(x) # 计算偏度 agostino.test(x) # 偏度 阅读全文
posted @ 2020-03-08 21:43
看星星的派大星
阅读(5374)
评论(0)
推荐(0)
摘要:
cd 到 C:\\windows\\Fonts 然后dir 至于那个是中文字体则,非常难区分。 阅读全文
posted @ 2020-03-08 01:39
看星星的派大星
阅读(1714)
评论(0)
推荐(0)
摘要:
# draw hist from matplotlib import pyplot as plt from random import gauss #from matplotlib import rc from matplotlib import font_manager #font = {'fam 阅读全文
posted @ 2020-03-08 01:30
看星星的派大星
阅读(441)
评论(0)
推荐(0)
摘要:
在头文件 stdlib.h 中 rand() 产生在0到最大整数之间的一个随机数。 比如产生0-16之间的随机数, 则 rand()%16 要产生3-7,之间的随机数,则 rand()%4 + 3 要产生3.2-7.6 之间的随机小数,则, (rand()%44 + 32) /10 44 是 32 阅读全文
posted @ 2020-03-06 20:53
看星星的派大星
阅读(336)
评论(0)
推荐(0)
摘要:
unsigned 表示不区分正负,但是占的字节数不变,只不过数字范围不一样。 X86 X64 short 2 2 int 4 4 long int 4 8 char 1 1 float 4 4 double 8 8 阅读全文
posted @ 2020-03-06 20:46
看星星的派大星
阅读(3252)
评论(0)
推荐(0)
浙公网安备 33010602011771号