Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion neuroseries/interval_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def in_interval(self, tsd):
IntervalSet.
"""
bins = self.values.ravel()
ix = np.array(pd.cut(tsd.index, bins, labels=np.arange(len(bins) - 1, dtype=np.int64)))
ix = np.array(pd.cut(tsd.index, bins, labels=np.arange(len(bins) - 1, dtype=np.float64)))
ix[np.floor(ix / 2) * 2 != ix] = np.NaN
ix = np.floor(ix/2)
return ix
Expand Down
2 changes: 1 addition & 1 deletion neuroseries/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def restrict(self, iset, keep_labels=False):
ix = ~np.isnan(ix)
tsd_r = tsd_r[ix]
if not keep_labels:
s = tsd_r.iloc[:, col]
s = tsd_r.iloc[:,0]
return Tsd(s)
return Tsd(tsd_r, copy=True)

Expand Down