Skip to content

Commit e65b865

Browse files
Merge pull request #946 from fepegar/945-remove-to-filename-from-getting-started
DOC: Remove to_filename from Getting started As suggested by @matthew-brett in #945.
2 parents ac88ca3 + a48054e commit e65b865

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

doc/source/gettingstarted.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ e.g.
8686
Corresponding "setter" methods allow modifying a header, while ensuring its
8787
compliance with the file format specifications.
8888

89-
In some situations we need even more flexibility, and for with great courage,
90-
NiBabel also offers access to the raw header information
89+
In some situations we need even more flexibility and, for those with great
90+
courage, NiBabel also offers access to the raw header information
9191

9292
>>> raw = hdr.structarr
9393
>>> raw['xyzt_units']
@@ -111,14 +111,9 @@ In this case, we used the identity matrix as the affine transformation. The
111111
image header is initialized from the provided data array (i.e. shape, dtype)
112112
and all other values are set to resonable defaults.
113113

114-
Saving this new image to a file is trivial. We won't do it here, but it looks
115-
like::
114+
Saving this new image to a file is trivial:
116115

117-
img.to_filename(os.path.join('build','test4d.nii.gz'))
118-
119-
or::
120-
121-
nib.save(img, os.path.join('build','test4d.nii.gz'))
116+
>>> nib.save(img, os.path.join('build', 'test4d.nii.gz')) # doctest: +SKIP
122117

123118
This short introduction only gave a quick overview of NiBabel's capabilities.
124119
Please have a look at the :ref:`api` for more details about supported file

0 commit comments

Comments
 (0)