Skip to content

Instantly share code, notes, and snippets.

@lotka
Last active April 8, 2016 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lotka/a97f21979bab7d4d03812626b408f0f9 to your computer and use it in GitHub Desktop.
Save lotka/a97f21979bab7d4d03812626b408f0f9 to your computer and use it in GitHub Desktop.
from itertools import bounds
def getExperiments(bounds):
ranges=[]
for key,val in bounds.items():
min,max,n = val
values = np.linspace(min,max,n)
ranges.append(values)
# List of store all the combinations
overwrite_dict_list = []
for element in product(*ranges):
d = {}
for i,key in enumerate(bounds.keys()):
d[key] = element[i]
overwrite_dict_list.append(d)
return overwrite_dict_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment