Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MLD3
FIDDLE
Commits
f4a1c687
Commit
f4a1c687
authored
Jun 19, 2019
by
Shengpu Tang (tangsp)
Browse files
bug fix: float-valued dt
parent
6b85164d
Changes
1
Show whitespace changes
Inline
Side-by-side
FIDDLE/helpers.py
View file @
f4a1c687
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment