Skip to content

Commit

Permalink
ENH: Allow kwargs in generic save method
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Oct 5, 2020
1 parent 17a1eca commit ae835d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nibabel/loadsave.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def guessed_image_type(filename):
raise ImageFileError(f'Cannot work out file type of "{filename}"')


def save(img, filename):
def save(img, filename, **kwargs):
""" Save an image to file adapting format to `filename`
Parameters
Expand All @@ -96,7 +96,7 @@ def save(img, filename):

# Save the type as expected
try:
img.to_filename(filename)
img.to_filename(filename, **kwargs)
except ImageFileError:
pass
else:
Expand Down

0 comments on commit ae835d2

Please sign in to comment.