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

bug fix

parent 4cb7801f
......@@ -105,10 +105,10 @@ def is_numeric(v):
def _get_time_bins(T, dt):
# Defines the boundaries of time bins [0, dt, 2*dt, ..., k*dt]
# where k*dt <= T and (k+1)*dt > T
return np.arange(0, dt*(T//dt+1), dt)
return np.arange(0, dt*(np.floor(T/dt)+1), dt)
def _get_time_bins_index(T, dt):
return pd.Index(pd.interval_range(start=0, end=T, freq=dt, closed='left'))
return pd.interval_range(start=0, periods=np.floor(T/dt), freq=dt, closed='left')
def pivot_event_table(df):
df = df.copy()
Markdown is supported
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