Skip to content

Commit

Permalink
More Python 2.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
enricodetoma committed Oct 30, 2014
1 parent cbb2a1a commit c1b80c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tstables/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def read_data(cls):

def read_random_hour(ts,min_dt,max_dt):
rnd = numpy.random.rand(1)[0]
start_offset = (max_dt - min_dt - datetime.timedelta(hours=1)) * rnd
start_offset = datetime.timedelta(seconds=(max_dt - min_dt - datetime.timedelta(hours=1)).total_seconds() * rnd)
start_dt = min_dt + start_offset
end_dt = start_dt + datetime.timedelta(hours=1)

Expand Down

0 comments on commit c1b80c3

Please sign in to comment.