@@ -6,26 +6,26 @@ WARNING: DO NOT edit .pxi FILE directly, .pxi is generated from .pxi.in
6
6
7
7
{{py:
8
8
9
- # dtype, ttype, c_type, to_c_type
10
- dtypes = [('complex128 ', 'complex128', 'khcomplex128_t ',
11
- 'to_khcomplex128_t'),
12
- ('complex64 ', 'complex64', 'khcomplex64_t ',
13
- 'to_khcomplex64_t'),
14
- ('float64', 'float64', 'float64_t', ''),
15
- ('float32', 'float32', 'float32_t', ''),
16
- ('uint64', 'uint64', 'uint64_t', ''),
17
- ('uint32', 'uint32', 'uint32_t', ''),
18
- ('uint16', 'uint16', 'uint16_t', ''),
19
- ('uint8', 'uint8', 'uint8_t', ''),
20
- ('object', 'pymap', 'object', ''),
21
- ('int64', 'int64', 'int64_t', ''),
22
- ('int32', 'int32', 'int32_t', ''),
23
- ('int16', 'int16', 'int16_t', ''),
24
- ('int8', 'int8', 'int8_t', '')]
9
+ # name, dtype, ttype, c_type, to_c_type
10
+ dtypes = [('Complex128 ', 'complex128', 'complex128 ',
11
+ 'khcomplex128_t', ' to_khcomplex128_t'),
12
+ ('Complex64 ', 'complex64', 'complex64 ',
13
+ 'khcomplex64_t', ' to_khcomplex64_t'),
14
+ ('Float64', ' float64', 'float64', 'float64_t', ''),
15
+ ('Float32', ' float32', 'float32', 'float32_t', ''),
16
+ ('UInt64', ' uint64', 'uint64', 'uint64_t', ''),
17
+ ('UInt32', ' uint32', 'uint32', 'uint32_t', ''),
18
+ ('UInt16', ' uint16', 'uint16', 'uint16_t', ''),
19
+ ('UInt8', ' uint8', 'uint8', 'uint8_t', ''),
20
+ ('Object', ' object', 'pymap', 'object', ''),
21
+ ('Int64', ' int64', 'int64', 'int64_t', ''),
22
+ ('Int32', ' int32', 'int32', 'int32_t', ''),
23
+ ('Int16', ' int16', 'int16', 'int16_t', ''),
24
+ ('Int8', ' int8', 'int8', 'int8_t', '')]
25
25
26
26
}}
27
27
28
- {{for dtype, ttype, c_type, to_c_type in dtypes}}
28
+ {{for name, dtype, ttype, c_type, to_c_type in dtypes}}
29
29
30
30
31
31
@cython.wraparound(False)
@@ -96,11 +96,7 @@ cpdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna):
96
96
97
97
int ret = 0
98
98
99
- {{if dtype[0]!='u'}}
100
- result_keys = {{dtype.title()}}Vector()
101
- {{else}}
102
- result_keys = {{'U'+dtype[1::].title()}}Vector()
103
- {{endif}}
99
+ result_keys = {{name}}Vector()
104
100
result_counts = Int64Vector()
105
101
table = kh_init_{{ttype}}()
106
102
0 commit comments