@@ -10,29 +10,29 @@ WARNING: DO NOT edit .pxi FILE directly, .pxi is generated from .pxi.in
10
10
11
11
{{py:
12
12
13
- # name, dtype, hashtable_name
14
- dtypes = [('Float64', 'float64', 'Float64' ),
15
- ('Float32', 'float32', 'Float64' ),
16
- ('Int64', 'int64', 'Int64' ),
17
- ('Int32', 'int32', 'Int64' ),
18
- ('Int16', 'int16', 'Int64' ),
19
- ('Int8', 'int8', 'Int64' ),
20
- ('UInt64', 'uint64', 'UInt64' ),
21
- ('UInt32', 'uint32', 'UInt64' ),
22
- ('UInt16', 'uint16', 'UInt64' ),
23
- ('UInt8', 'uint8', 'UInt64' ),
13
+ # name, dtype
14
+ dtypes = [('Float64', 'float64'),
15
+ ('Float32', 'float32'),
16
+ ('Int64', 'int64'),
17
+ ('Int32', 'int32'),
18
+ ('Int16', 'int16'),
19
+ ('Int8', 'int8'),
20
+ ('UInt64', 'uint64'),
21
+ ('UInt32', 'uint32'),
22
+ ('UInt16', 'uint16'),
23
+ ('UInt8', 'uint8'),
24
24
]
25
25
}}
26
26
27
- {{for name, dtype, hashtable_name in dtypes}}
27
+ {{for name, dtype in dtypes}}
28
28
29
29
30
30
cdef class {{name}}Engine(IndexEngine):
31
31
# constructor-caller is responsible for ensuring that vgetter()
32
32
# returns an ndarray with dtype {{dtype}}_t
33
33
34
34
cdef _make_hash_table(self, Py_ssize_t n):
35
- return _hash.{{hashtable_name }}HashTable(n)
35
+ return _hash.{{name }}HashTable(n)
36
36
37
37
{{if name not in {'Float64', 'Float32'} }}
38
38
cdef _check_type(self, object val):
@@ -41,9 +41,7 @@ cdef class {{name}}Engine(IndexEngine):
41
41
{{endif}}
42
42
43
43
cdef void _call_map_locations(self, values):
44
- # self.mapping is of type {{hashtable_name}}HashTable,
45
- # so convert dtype of values
46
- self.mapping.map_locations(algos.ensure_{{hashtable_name.lower()}}(values))
44
+ self.mapping.map_locations(algos.ensure_{{name.lower()}}(values))
47
45
48
46
cdef _maybe_get_bool_indexer(self, object val):
49
47
cdef:
0 commit comments