Answer by Sinbud for Filtering Numpy Array representing state
Couldn't find a built-in numpy solution for this kind of 'positive lookbehind' matching problem. Maybe something like this will do:idx_l = np.where(x['ts']<=2)[0]idx_r =...
View ArticleFiltering Numpy Array representing state
There are various questions regarding filtering of the numpy arrays including:Filter rows of a numpy array?But I have a slightly different issue:>>> x = np.empty(shape=(5,), dtype=[('ts',...
View Article