@@ -40,7 +40,6 @@ def _binop(self, val, *, op):
40
40
dataobj = op (self_ , val_ ).astype (int )
41
41
return self .__class__ (dataobj , affine , header )
42
42
43
-
44
43
def _unop (self , * , op ):
45
44
"""
46
45
Parameters
@@ -53,7 +52,6 @@ def _unop(self, *, op):
53
52
dataobj = op (np .asanyarray (self .dataobj ))
54
53
return self .__class__ (dataobj , self .affine , self .header )
55
54
56
-
57
55
def __add__ (self , other ):
58
56
return self ._binop (other , op = operator .__add__ )
59
57
@@ -85,7 +83,6 @@ def __abs__(self):
85
83
return self ._unop (op = operator .__abs__ )
86
84
87
85
88
-
89
86
def _input_validation (self , val ):
90
87
"""Check images orientation, affine, and shape muti-images operation."""
91
88
_type_check (self )
@@ -100,7 +97,7 @@ def _input_validation(self, val):
100
97
# Check shape.
101
98
if self .shape [:3 ] != val .shape [:3 ]:
102
99
raise ValueError ("Two images should have the same shape except"
103
- "the time dimension." )
100
+ "the time dimension." )
104
101
105
102
# if 4th dim exist in a image,
106
103
# reshape the 3d image to ensure valid projection
@@ -124,6 +121,7 @@ def _input_validation(self, val):
124
121
val_ = val
125
122
return self_ , val_
126
123
124
+
127
125
def _type_check (* args ):
128
126
"""Ensure image contains correct nifti data type."""
129
127
# Check types
0 commit comments