Commit f4a1c687 authored by Shengpu Tang (tangsp)'s avatar Shengpu Tang (tangsp)
Browse files

bug fix: float-valued dt

parent 6b85164d
......@@ -108,7 +108,7 @@ def _get_time_bins(T, dt):
return np.arange(0, dt*(np.floor(T/dt)+1), dt)
def _get_time_bins_index(T, dt):
return pd.interval_range(start=0, periods=np.floor(T/dt), freq=dt, closed='left')
return pd.cut([], _get_time_bins(T, dt), right=False).categories
def pivot_event_table(df):
df = df.copy()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment