Skip to content

Commit

Permalink
Merge branch 'master' of github.com:poldracklab/expfactory-python
Browse files Browse the repository at this point in the history
  • Loading branch information
rwblair committed Nov 21, 2019
2 parents e57f820 + 0fb39c2 commit db17afa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion expfactory/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import re

import numpy as np

def generate_base(battery_dest,tasks=None,experiment_repo=None,survey_repo=None,game_repo=None,
battery_repo=None,warning=True):
Expand Down Expand Up @@ -282,7 +283,7 @@ def get_load_static(valid_experiments,url_prefix="",unique=True):
loadstring = "%s%s%s" %(loadstring,js,css)
if unique == True:
scripts = loadstring.split("\n")
scripts_index = list(set(scripts, return_index=True))[1]
scripts_index = list(np.unique(scripts, return_index=True))[1]
# This ensures that scripts are loaded in same order as specified in config.json
unique_scripts = [scripts[idx] for idx in sorted(scripts_index)]
loadstring = "\n".join(unique_scripts)
Expand Down

0 comments on commit db17afa

Please sign in to comment.