Skip to content

Commit d25b307

Browse files
committed
DOC: Add to Nifti1Header.set_intent docstring example
1 parent 7196a8c commit d25b307

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nibabel/nifti1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,8 @@ def set_intent(self, code, params=(), name='', allow_unknown=False):
13751375
>>> hdr.get_intent()
13761376
('f test', (0.0, 0.0), '')
13771377
>>> hdr.set_intent(9999, allow_unknown=True) # unknown code
1378+
>>> hdr.get_intent()
1379+
('unknown code 9999', (), '')
13781380
'''
13791381
hdr = self._structarr
13801382
known_intent = code in intent_codes

0 commit comments

Comments
 (0)