Open yasirroni opened 1 year ago
My implementation:
from numba import njit
@njit
def find_first(array, item):
for idx, val in enumerate(array):
if val == item:
return idx
return None
def get_paa_index(paa_dataset_inv, paa_data):
paa_dataset_inv = paa_dataset_inv.ravel()
paa_data = paa_data.ravel()
idxs = []
idx = 0
for val in paa_data:
idx_ = find_first(paa_dataset_inv[idx:], val)
idx += idx_
idxs.append(idx)
return idxs
get_paa_index(paa_dataset_inv, paa_data)
Is your feature request related to a problem? Please describe. I'm running the tutorial of PAA and SAX in the doc
After reading the docs, it seems that there is no function to find the index when the paa_data changes occured.
Describe the solution you'd like
paa.get_index(paa_data)
should return the index where thepaa_data
changes occured. That will be nice.