I have two lists that are related to one another. An original list and a downsampled list. The original list contains all of my reference data and the downsampled list contains a small sample of the original data. They look like this:
original list:
original = [
0.0,
0.033,
0.066,
0.1,
0.133,
0.166,
0.199,
0.233,
0.266,
0.299,
0.333,
0.366,
0.399,
0.433,
0.466,
0.499,
0.533,
0.566,
0.599,
0.633,
0.666,
0.699,
0.733,
0.766,
0.799,
0.833,
0.866,
0.899,
0.933,
0.966,
0.999,
1.033,
1.066,
1.099,
1.133,
1.166,
1.199,
1.232,
1.266,
1.299,
1.332,
1.366,
1.399,
1.432,
1.466,
1.499,
1.532,
1.566,
1.599,
1.632,
1.666,
1.699,
1.732,
1.766,
1.799,
1.832,
1.866,
1.899,
1.932,
1.966,
1.999,
2.032,
2.066,
2.099,
2.132,
2.166,
2.199,
2.232,
2.266,
2.299,
2.332,
2.366,
2.399,
2.432,
2.466,
2.499,
2.532,
2.566,
2.599,
2.632,
2.666,
2.699
]
and the downsampled list:
downsampled = [
0.633078,
1.632956,
2.632756
]
How do I get the indices of the elements in original that are exactly or the closet match to the items in downsampled?