Skip to content

Commit 9de0ef6

Browse files
authored
Add the missing overwrite and verbose parameters to Transform.save (#12004)
1 parent 034e9dc commit 9de0ef6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/changes/devel.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Bugs
5454
- Fix bug with axis clip box boundaries in :func:`mne.viz.plot_evoked_topo` and related functions (:gh:`11999` by `Eric Larson`_)
5555
- Fix bug with ``subject_info`` when loading data from and exporting to EDF file (:gh:`11952` by `Paul Roujansky`_)
5656
- Fix handling of channel information in annotations when loading data from and exporting to EDF file (:gh:`11960` by `Paul Roujansky`_)
57+
- Add missing ``overwrite`` and ``verbose`` parameters to :meth:`Transform.save() <mne.transforms.Transform.save>` (:gh:`12004` by `Marijn van Vliet`_)
5758

5859
API changes
5960
~~~~~~~~~~~

mne/transforms.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,19 @@ def to_str(self):
184184
"""The "to" frame as a string."""
185185
return _coord_frame_name(self["to"])
186186

187-
def save(self, fname):
187+
@fill_doc
188+
@verbose
189+
def save(self, fname, *, overwrite=False, verbose=None):
188190
"""Save the transform as -trans.fif file.
189191
190192
Parameters
191193
----------
192194
fname : path-like
193195
The name of the file, which should end in ``-trans.fif``.
196+
%(overwrite)s
197+
%(verbose)s
194198
"""
195-
write_trans(fname, self)
199+
write_trans(fname, self, overwrite=overwrite, verbose=verbose)
196200

197201
def copy(self):
198202
"""Make a copy of the transform."""

0 commit comments

Comments
 (0)