def load_timings(path, args, y):
logging.debug("Loading timings from {}".format(path))
tm = numpy.load(path)
num_steps = min(tm['step'], args.finish)
df = pandas.DataFrame({k : tm[k] for k in [y, 'time_step']})[args.start:num_steps]
one_step = df['time_step'].median() / 3600.0
logging.debug("Median time for one step is {} hours".format(one_step))
if args.hours:
df.index = (args.start + numpy.arange(0, df.index.shape[0])) * one_step
return pandas.rolling_mean(df, args.window).iloc[args.window:]
评论列表
文章目录