import json ori_input = "[[1,0.1,0.2],[0.1,1,0.3],[0.2,0.3,1]]" ori_input_matrix = json.loads(ori_input) print(type(ori_input_matrix))