Skip to content

Commit

Permalink
improved function for extracting sub states
Browse files Browse the repository at this point in the history
  • Loading branch information
damianoazzolini committed Nov 2, 2024
1 parent 17f2055 commit e75aa2d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pastasolver/models_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,7 @@ def get_sub_world(super_w : str, map_id_list : 'list[int]') -> str:
map_id_list = [0,2]
result = 00 (extracts the values in position 0 and 2 of super_w)
'''
sub_w : str = ""
for el in map_id_list:
sub_w = sub_w + super_w[el]

return sub_w
return ''.join([super_w[i] for i in map_id_list])


def get_highest_prob_and_w_id_map(
Expand Down

0 comments on commit e75aa2d

Please sign in to comment.