Skip to content

Commit ae835d2

Browse files
committed
ENH: Allow kwargs in generic save method
1 parent 17a1eca commit ae835d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/loadsave.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def guessed_image_type(filename):
7878
raise ImageFileError(f'Cannot work out file type of "{filename}"')
7979

8080

81-
def save(img, filename):
81+
def save(img, filename, **kwargs):
8282
""" Save an image to file adapting format to `filename`
8383
8484
Parameters
@@ -96,7 +96,7 @@ def save(img, filename):
9696

9797
# Save the type as expected
9898
try:
99-
img.to_filename(filename)
99+
img.to_filename(filename, **kwargs)
100100
except ImageFileError:
101101
pass
102102
else:

0 commit comments

Comments
 (0)