Skip to content

Commit f7db5bf

Browse files
authored
Fix typing in SpatialImage __init__
This corrects the typing for the `SpatialImage` `__init__` function by allowing `None` for `affine`
1 parent 1843355 commit f7db5bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/spatialimages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ class SpatialImage(DataobjImage):
481481
def __init__(
482482
self,
483483
dataobj: ArrayLike,
484-
affine: np.ndarray,
484+
affine: np.ndarray | None,
485485
header: FileBasedHeader | ty.Mapping | None = None,
486486
extra: ty.Mapping | None = None,
487487
file_map: FileMap | None = None,

0 commit comments

Comments
 (0)