Skip to content

Commit

Permalink
Merge pull request #1276 from DimitriPapadopoulos/refurb
Browse files Browse the repository at this point in the history
MNT: `[:]` → `.copy()`
  • Loading branch information
effigies authored Dec 3, 2023
2 parents 6ba501e + 8461ef9 commit 0b7ac62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nibabel/spm2analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from . import spm99analyze as spm99 # module import

image_dimension_dtd = spm99.image_dimension_dtd[:]
image_dimension_dtd = spm99.image_dimension_dtd.copy()
image_dimension_dtd[image_dimension_dtd.index(('funused2', 'f4'))] = ('scl_inter', 'f4')

# Full header numpy dtype combined across sub-fields
Expand Down
4 changes: 2 additions & 2 deletions nibabel/spm99analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
""" Support subtle variations of SPM version of Analyze """
header_key_dtd = analyze.header_key_dtd
# funused1 in dime subfield is scalefactor
image_dimension_dtd = analyze.image_dimension_dtd[:]
image_dimension_dtd = analyze.image_dimension_dtd.copy()
image_dimension_dtd[image_dimension_dtd.index(('funused1', 'f4'))] = ('scl_slope', 'f4')
# originator text field used as image origin (translations)
data_history_dtd = analyze.data_history_dtd[:]
data_history_dtd = analyze.data_history_dtd.copy()
data_history_dtd[data_history_dtd.index(('originator', 'S10'))] = ('origin', 'i2', (5,))

# Full header numpy dtype combined across sub-fields
Expand Down

0 comments on commit 0b7ac62

Please sign in to comment.