File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -416,10 +416,10 @@ def invert_contrast(self, batch_size=512):
416416
417417 if signal_mean < noise_mean :
418418 logger .info ('Need to invert contrast' )
419- scale_factor = np . array ( - 1.0 )
419+ scale_factor = - 1.0
420420 else :
421421 logger .info ('No need to invert contrast' )
422- scale_factor = np . array ( 1.0 )
422+ scale_factor = 1.0
423423
424424 logger .info ('Adding Scaling Xform to end of generation pipeline' )
425425 self .generation_pipeline .add_xform (Multiply (scale_factor ))
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def __init__(self, factor):
130130 :param factor: An ndarray of scalar factors to use for amplitude multiplication.
131131 """
132132 super ().__init__ ()
133- self .multipliers = factor
133+ self .multipliers = np . array ( factor )
134134
135135 def _forward (self , im , indices ):
136136 if self .multipliers .size == 1 :
@@ -165,7 +165,7 @@ def __init__(self, shifts):
165165 :param shifts: An ndarray of shape (n, 2)
166166 """
167167 super ().__init__ ()
168- self .shifts = shifts
168+ self .shifts = np . array ( shifts )
169169 self .n = shifts .shape [0 ]
170170
171171 def _forward (self , im , indices ):
@@ -257,7 +257,7 @@ def __init__(self, addend):
257257 :param addend: An ndarray of shape (n,)
258258 """
259259 super ().__init__ ()
260- self .addend = addend
260+ self .addend = np . array ( addend )
261261
262262 def _forward (self , im , indices ):
263263 if self .addend .size == 1 :
You can’t perform that action at this time.
0 commit comments