@@ -41,9 +41,7 @@ class ColorBench(ImageBench):
4141 def set_args (self , dtype ):
4242 if self .shape [- 1 ] != 3 :
4343 raise ValueError ("shape must be 3 on the last axis" )
44- imaged = cupy .testing .shaped_random (
45- self .shape , xp = cp , dtype = dtype , scale = 1.0
46- )
44+ imaged = cupy .testing .shaped_random (self .shape , xp = cp , dtype = dtype , scale = 1.0 )
4745 image = cp .asnumpy (imaged )
4846 self .args_cpu = (image ,)
4947 self .args_gpu = (imaged ,)
@@ -79,9 +77,7 @@ class RGBABench(ImageBench):
7977 def set_args (self , dtype ):
8078 if self .shape [- 1 ] != 4 :
8179 raise ValueError ("shape must be 4 on the last axis" )
82- imaged = cupy .testing .shaped_random (
83- self .shape , xp = cp , dtype = dtype , scale = 1.0
84- )
80+ imaged = cupy .testing .shaped_random (self .shape , xp = cp , dtype = dtype , scale = 1.0 )
8581 image = cp .asnumpy (imaged )
8682 self .args_cpu = (image ,)
8783 self .args_gpu = (imaged ,)
@@ -116,9 +112,7 @@ def __init__(
116112
117113 def _generate_labels (self , dtype ):
118114 ndim = len (self .shape )
119- blobs_kwargs = dict (
120- blob_size_fraction = 0.05 , volume_fraction = 0.35 , rng = 5
121- )
115+ blobs_kwargs = dict (blob_size_fraction = 0.05 , volume_fraction = 0.35 , rng = 5 )
122116 # binary blobs only creates square outputs
123117 labels = measure .label (
124118 data .binary_blobs (max (self .shape ), n_dim = ndim , ** blobs_kwargs )
@@ -314,8 +308,7 @@ def main(args):
314308 "--img_size" ,
315309 type = str ,
316310 help = (
317- "Size of input image (omit color channel, it will be appended "
318- "as needed)"
311+ "Size of input image (omit color channel, it will be appended as needed)"
319312 ),
320313 required = True ,
321314 )
0 commit comments