查看属性 .ndim :维度 .shape :各维度的尺度 (2,5) .size :元素的个数 10 .dtype :元素的类型 dtype(‘int32’) ndarray数组的创建 np.arange(n) ; 元素从0到n-1的ndarray类型 np.ones(shape): 生成全1 n ...
分类:
其他好文 时间:
2020-06-09 23:45:50
阅读次数:
154
2、Go语言基础之数据类型 Go语言中有丰富的数据类型,除了基本的整型、浮点型、布尔型、字符串外,还有数组、切片、结构体、函数、map、通道(channel)等。 基本数据类型 1.1整型 整型分为以下两个大类: 按长度分为:int8、int16、int32、int64 对应的无符号整型:uint8 ...
分类:
编程语言 时间:
2020-06-07 14:44:13
阅读次数:
68
ObjectID :Documents 自生成的 _id # 自增ID 全世界唯一的计数ID ?String: 字符串,必须是utf-8 ?Boolean:布尔值,true 或者false (这里有坑哦~在我们大Python中 True False 首字母大写) ?Integer:整数 (Int32 ...
分类:
数据库 时间:
2020-06-03 00:38:44
阅读次数:
123
接上一篇继续分析一下runtime.newproc方法。 函数签名 newproc函数的签名为 newproc(siz int32, fn funcval) siz是传入的参数大小(不是个数); fn对应的是函数,但并不是函数指针,funcval.fn才是真正指向函数代码的指针。 关键字go 在go ...
分类:
其他好文 时间:
2020-05-25 12:40:10
阅读次数:
67
题目: 思路: 循环求余 (x + y) % p = (x % p + y % p) % p,避免超过Int32的取值范围,导致大数越界。 递归法存在大量的重复运算(比如计算n和n 1是都会计算n 2),会超时。 动态规划,利用dp数组。 因为第n项只和前两个元素有关,所以只记录前两个元素。 代码: ...
分类:
其他好文 时间:
2020-05-18 18:44:55
阅读次数:
53
一、回环测试函数的实现,如下面的代码,主函数while循环中调用下面的函数loop_back 1 void loop_back(void) 2 { 3 int32_t ret = 0; 4 5 /* Loopback Test */ 6 // TCP server loopback test 7 i ...
分类:
其他好文 时间:
2020-05-05 10:50:26
阅读次数:
124
查询,官方的解释如下: 1 2 3 4 5 6 7 // rune is an alias for int32 and is equivalent to int32 in all ways. It is // used, by convention, to distinguish character ...
分类:
其他好文 时间:
2020-04-17 15:56:08
阅读次数:
63
下面是 Go 支持的基本类型: bool 数字类型 int8, int16, int32, int64, int uint8, uint16, uint32, uint64, uint float32, float64 complex64, complex128 byte rune string b ...
分类:
其他好文 时间:
2020-04-12 00:09:32
阅读次数:
84
```go package main /** Constants: true false iota nil Types: int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 comple... ...
分类:
其他好文 时间:
2020-04-11 20:23:03
阅读次数:
59
1.为什么这样定义编译时候会报错:error: multiple storage classes in declaration specifiers typedef static int INT32 百度搜到的答案:typedef是存储类的关键字,和auto、static、register一样是存储 ...
分类:
其他好文 时间:
2020-04-09 20:18:13
阅读次数:
108