Browse Source

trivial update

quarrying 4 years ago
parent
commit
acd3c2be00
2 changed files with 1 additions and 3 deletions
  1. 1 1
      khandy/boxes/boxes_and_indices.py
  2. 0 2
      khandy/utils_dict.py

+ 1 - 1
khandy/boxes/boxes_and_indices.py

@@ -27,7 +27,7 @@ def convert_boxes_list_to_boxes_and_indices(boxes_list):
     boxes = _concat(boxes_list, axis=0)
     
     indices_list = [np.full((len(b), 1), i, boxes.dtype) 
-                     for i, b in enumerate(boxes_list)]
+                    for i, b in enumerate(boxes_list)]
     indices = _concat(indices_list, axis=0)
     return boxes, indices
     

+ 0 - 2
khandy/utils_dict.py

@@ -72,7 +72,6 @@ def split_multidict_on_key(multidict_obj, split_ratio, use_shuffle=False):
         
     be_split_list = []
     for i in range(len(split_ratio)):
-        #if indices[i] != indices[i + 1]:
         part_keys = dict_keys[indices[i]: indices[i + 1]]
         part_dict = dict([(key, multidict_obj[key]) for key in part_keys])
         be_split_list.append(part_dict)
@@ -94,7 +93,6 @@ def split_multidict_on_value(multidict_obj, split_ratio, use_shuffle=False):
         if use_shuffle: 
             random.shuffle(cloned)
         for i in range(len(split_ratio)):
-            #if indices[i] != indices[i + 1]:
             be_split_list[i][key] = cloned[indices[i]: indices[i + 1]]
     return be_split_list