@@ -84,9 +84,9 @@ def is_correct_format(cls, fileobj):
84
84
Parameters
85
85
----------
86
86
fileobj : string or file-like object
87
- If string, a filename; otherwise an open file-like object
88
- pointing to TCK file (and ready to read from the beginning
89
- of the TCK header data ). Note that calling this function
87
+ If string, a filename; otherwise an open file-like object in
88
+ binary mode pointing to TCK file (and ready to read from the
89
+ beginning of the TCK header). Note that calling this function
90
90
does not change the file position.
91
91
92
92
Returns
@@ -119,9 +119,9 @@ def load(cls, fileobj, lazy_load=False):
119
119
Parameters
120
120
----------
121
121
fileobj : string or file-like object
122
- If string, a filename; otherwise an open file-like object
123
- pointing to TCK file (and ready to read from the beginning
124
- of the TCK header). Note that calling this function
122
+ If string, a filename; otherwise an open file-like object in
123
+ binary mode pointing to TCK file (and ready to read from the
124
+ beginning of the TCK header). Note that calling this function
125
125
does not change the file position.
126
126
lazy_load : {False, True}, optional
127
127
If True, load streamlines in a lazy manner i.e. they will not be
@@ -173,9 +173,9 @@ def save(self, fileobj):
173
173
Parameters
174
174
----------
175
175
fileobj : string or file-like object
176
- If string, a filename; otherwise an open file-like object
177
- pointing to TCK file (and ready to write from the beginning
178
- of the TCK header data).
176
+ If string, a filename; otherwise an open file-like object in
177
+ binary mode pointing to TCK file (and ready to write from the
178
+ beginning of the TCK header data).
179
179
"""
180
180
# Enforce float32 in little-endian byte order for data.
181
181
dtype = np .dtype ('<f4' )
@@ -241,8 +241,8 @@ def _write_header(fileobj, header):
241
241
Parameters
242
242
----------
243
243
fileobj : file-like object
244
- An open binary file object pointing to TCK file (and ready to
245
- write at the beginning of the TCK header).
244
+ An open file-like object in binary mode pointing to TCK file (and
245
+ ready to read from the beginning of the TCK header).
246
246
"""
247
247
# Fields to exclude
248
248
exclude = [Field .MAGIC_NUMBER , # Handled separately.
@@ -295,9 +295,9 @@ def _read_header(fileobj):
295
295
Parameters
296
296
----------
297
297
fileobj : string or file-like object
298
- If string, a filename; otherwise an open binary file-like object
299
- pointing to TCK file (and ready to read from the beginning
300
- of the TCK header). Note that calling this function
298
+ If string, a filename; otherwise an open file-like object in
299
+ binary mode pointing to TCK file (and ready to read from the
300
+ beginning of the TCK header). Note that calling this function
301
301
does not change the file position.
302
302
303
303
Returns
@@ -368,9 +368,9 @@ def _read(cls, fileobj, header, buffer_size=4):
368
368
Parameters
369
369
----------
370
370
fileobj : string or file-like object
371
- If string, a filename; otherwise an open file-like object
372
- pointing to TCK file (and ready to read from the beginning
373
- of the TCK header). Note that calling this function
371
+ If string, a filename; otherwise an open file-like object in
372
+ binary mode pointing to TCK file (and ready to read from the
373
+ beginning of the TCK header). Note that calling this function
374
374
does not change the file position.
375
375
header : dict
376
376
Metadata associated with this tractogram file.
0 commit comments