Skip to content

Commit

Permalink
Fix typing in SpatialImage __init__
Browse files Browse the repository at this point in the history
This corrects the typing for the `SpatialImage` `__init__` function by allowing `None` for `affine`
  • Loading branch information
blakedewey authored Sep 8, 2023
1 parent 1843355 commit f7db5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nibabel/spatialimages.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ class SpatialImage(DataobjImage):
def __init__(
self,
dataobj: ArrayLike,
affine: np.ndarray,
affine: np.ndarray | None,
header: FileBasedHeader | ty.Mapping | None = None,
extra: ty.Mapping | None = None,
file_map: FileMap | None = None,
Expand Down

0 comments on commit f7db5bf

Please sign in to comment.