Closed jolson1129 closed 2 months ago
Can you give an example?
I've found that a list of booleans is okay - I had a pandas series in this case when I observed this behavior.
import pynapple as nap
import pandas as pd
is_simp = nap.IntervalSet(start=[0,3], end=[1,4])
bool_series = pd.Series([True, False])
print(type(is_simp[1]))
print(type(is_simp[[True, False]]))
print(type(is_simp[bool_series]))
Output: <class 'pynapple.core.interval_set.IntervalSet'> <class 'pynapple.core.interval_set.IntervalSet'> <class 'numpy.ndarray'>
Ok I see. Doesn't seem too complicated to fix.
Fixed
While using an interval set, logical slicing appears to transform the IntervalSet into a numpy array.