@@ -29,6 +29,7 @@ def get_allocated_khash_memory():
2929@pytest .mark .parametrize (
3030 "table_type, dtype" ,
3131 [
32+ (ht .PyObjectHashTable , np .object_ ),
3233 (ht .Int64HashTable , np .int64 ),
3334 (ht .UInt64HashTable , np .uint64 ),
3435 (ht .Float64HashTable , np .float64 ),
@@ -73,13 +74,15 @@ def test_get_set_contains_len(self, table_type, dtype):
7374 assert str (index + 2 ) in str (excinfo .value )
7475
7576 def test_map (self , table_type , dtype ):
76- N = 77
77- table = table_type ()
78- keys = np .arange (N ).astype (dtype )
79- vals = np .arange (N ).astype (np .int64 ) + N
80- table .map (keys , vals )
81- for i in range (N ):
82- assert table .get_item (keys [i ]) == i + N
77+ # PyObjectHashTable has no map-method
78+ if table_type != ht .PyObjectHashTable :
79+ N = 77
80+ table = table_type ()
81+ keys = np .arange (N ).astype (dtype )
82+ vals = np .arange (N ).astype (np .int64 ) + N
83+ table .map (keys , vals )
84+ for i in range (N ):
85+ assert table .get_item (keys [i ]) == i + N
8386
8487 def test_map_locations (self , table_type , dtype ):
8588 N = 8
@@ -192,6 +195,7 @@ def get_ht_function(fun_name, type_suffix):
192195@pytest .mark .parametrize (
193196 "dtype, type_suffix" ,
194197 [
198+ (np .object_ , "object" ),
195199 (np .int64 , "int64" ),
196200 (np .uint64 , "uint64" ),
197201 (np .float64 , "float64" ),
0 commit comments