@@ -380,8 +380,7 @@ def setup_method(self):
380
380
@pytest .mark .parametrize ("norm" , [None , "forward" , "backward" , "ortho" ])
381
381
@pytest .mark .parametrize ("order" , ["C" , "F" ])
382
382
def test_fft2 (self , dtype , axes , norm , order ):
383
- x = generate_random_numpy_array ((2 , 3 , 4 ), dtype )
384
- a_np = numpy .array (x , order = order )
383
+ a_np = generate_random_numpy_array ((2 , 3 , 4 ), dtype , order )
385
384
a = dpnp .array (a_np )
386
385
387
386
result = dpnp .fft .fft2 (a , axes = axes , norm = norm )
@@ -443,8 +442,7 @@ def setup_method(self):
443
442
@pytest .mark .parametrize ("norm" , [None , "backward" , "forward" , "ortho" ])
444
443
@pytest .mark .parametrize ("order" , ["C" , "F" ])
445
444
def test_fftn (self , dtype , axes , norm , order ):
446
- x = generate_random_numpy_array ((2 , 3 , 4 , 5 ), dtype )
447
- a_np = numpy .array (x , order = order )
445
+ a_np = generate_random_numpy_array ((2 , 3 , 4 , 5 ), dtype , order )
448
446
a = dpnp .array (a_np )
449
447
450
448
result = dpnp .fft .fftn (a , axes = axes , norm = norm )
@@ -698,8 +696,7 @@ def test_irfft_1D_on_2D_array(self, dtype, n, axis, norm, order):
698
696
@pytest .mark .parametrize ("norm" , [None , "backward" , "forward" , "ortho" ])
699
697
@pytest .mark .parametrize ("order" , ["C" , "F" ])
700
698
def test_irfft_1D_on_3D_array (self , dtype , n , axis , norm , order ):
701
- x = generate_random_numpy_array ((4 , 5 , 6 ), dtype )
702
- a_np = numpy .array (x , order = order )
699
+ a_np = generate_random_numpy_array ((4 , 5 , 6 ), dtype , order )
703
700
# each 1-D array of input should be Hermitian
704
701
if axis == 0 :
705
702
a_np [0 ].imag = 0
@@ -936,8 +933,7 @@ def setup_method(self):
936
933
@pytest .mark .parametrize ("norm" , [None , "backward" , "forward" , "ortho" ])
937
934
@pytest .mark .parametrize ("order" , ["C" , "F" ])
938
935
def test_rfft2 (self , dtype , axes , norm , order ):
939
- x = generate_random_numpy_array ((2 , 3 , 4 ), dtype )
940
- a_np = numpy .array (x , order = order )
936
+ a_np = generate_random_numpy_array ((2 , 3 , 4 ), dtype , order )
941
937
a = dpnp .asarray (a_np )
942
938
943
939
result = dpnp .fft .rfft2 (a , axes = axes , norm = norm )
@@ -1001,8 +997,7 @@ def setup_method(self):
1001
997
@pytest .mark .parametrize ("norm" , [None , "backward" , "forward" , "ortho" ])
1002
998
@pytest .mark .parametrize ("order" , ["C" , "F" ])
1003
999
def test_rfftn (self , dtype , axes , norm , order ):
1004
- x = generate_random_numpy_array ((2 , 3 , 4 , 5 ), dtype )
1005
- a_np = numpy .array (x , order = order )
1000
+ a_np = generate_random_numpy_array ((2 , 3 , 4 , 5 ), dtype , order )
1006
1001
a = dpnp .asarray (a_np )
1007
1002
1008
1003
result = dpnp .fft .rfftn (a , axes = axes , norm = norm )
0 commit comments