Skip to content

Commit

Permalink
FIX: fix fetch of only value from dict for py3
Browse files Browse the repository at this point in the history
Examples using values()[0] - invalid in Python 3; changed to get item
``['0']`` which appears to be correct.
  • Loading branch information
matthew-brett committed Nov 21, 2012
1 parent 4fafecc commit 20df824
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/labs/need_data/glm_beta_and_variance.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
print('Loading design matrix...')

# the example example.labs.write_paradigm_file shows how to create this file
paradigm = list(load_paradigm_from_csv_file(paradigm_file).values())[0]
paradigm = load_paradigm_from_csv_file(paradigm_file)['0']

design_matrix = make_dmtx(frametimes, paradigm, hrf_model=hrf_model,
drift_model=drift_model, hfcut=hfcut)
Expand Down
2 changes: 1 addition & 1 deletion examples/labs/need_data/localizer_glm_ar.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

print('Loading design matrix...')

paradigm = list(load_paradigm_from_csv_file(paradigm_file).values())[0]
paradigm = load_paradigm_from_csv_file(paradigm_file)['0']

design_matrix = make_dmtx(frametimes, paradigm, hrf_model=hrf_model,
drift_model=drift_model, hfcut=hfcut)
Expand Down
2 changes: 1 addition & 1 deletion examples/labs/need_data/tmin_statistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

print('Loading design matrix...')

paradigm = load_paradigm_from_csv_file(paradigm_file).values()[0]
paradigm = load_paradigm_from_csv_file(paradigm_file)['0']

design_matrix = make_dmtx(frametimes, paradigm, hrf_model=hrf_model,
drift_model=drift_model, hfcut=hfcut)
Expand Down

0 comments on commit 20df824

Please sign in to comment.