small speed gain
This commit is contained in:
@@ -198,12 +198,10 @@ def build_goldmedalstandards(workouts,kfitness):
|
||||
# fitnesses.append(np.nan)
|
||||
|
||||
for w in workouts:
|
||||
#ids = [w.id for w in workouts.filter(date__gte=w.date-datetime.timedelta(days=90),
|
||||
# date__lte=w.date)]
|
||||
|
||||
ids = [w.id for w in workouts.filter(date__gte=w.date-datetime.timedelta(days=10),
|
||||
ids = [w.id for w in workouts.filter(date__gte=w.date-datetime.timedelta(days=90),
|
||||
date__lte=w.date)]
|
||||
|
||||
|
||||
powerdf = df[df['workout'].isin(ids)]
|
||||
indexmax = powerdf['goldmedalstandard'].idxmax()
|
||||
theid = powerdf.loc[indexmax,'workout']
|
||||
@@ -1880,6 +1878,7 @@ def goldmedalscorechart(user,startdate=None,enddate=None):
|
||||
markerduration.append(np.nan)
|
||||
duration.append(np.nan)
|
||||
|
||||
|
||||
df = pd.DataFrame({
|
||||
'markerscore':markerscore,
|
||||
'markerduration':markerduration,
|
||||
|
||||
Reference in New Issue
Block a user