@@ -563,9 +563,13 @@ def test_basic(self, dtype, n, norm):
563563
564564 result = dpnp .fft .hfft (ia , n = n , norm = norm )
565565 expected = numpy .fft .hfft (a , n = n , norm = norm )
566- # check_only_type_kind=True since NumPy always returns float64
567- # but dpnp return float32 if input is float32
568- assert_dtype_allclose (result , expected , check_only_type_kind = True )
566+ # TODO: change to the commented line when mkl_fft-2.0.0 is released
567+ # and bwing used with Intel NumPy >= 2.0.0
568+ flag = True
569+ # flag = True if numpy_version() < "2.0.0" else False
570+ assert_dtype_allclose (
571+ result , expected , factor = 24 , check_only_type_kind = flag
572+ )
569573
570574 @pytest .mark .parametrize (
571575 "dtype" , get_all_dtypes (no_none = True , no_complex = True )
@@ -579,7 +583,7 @@ def test_inverse(self, dtype, n, norm):
579583 result = dpnp .fft .ihfft (ia , n = n , norm = norm )
580584 expected = numpy .fft .ihfft (a , n = n , norm = norm )
581585 flag = True if numpy_version () < "2.0.0" else False
582- assert_dtype_allclose (result , expected , check_only_type_kind = True )
586+ assert_dtype_allclose (result , expected , check_only_type_kind = flag )
583587
584588 def test_error (self ):
585589 a = dpnp .ones (11 )
@@ -605,9 +609,8 @@ def test_basic(self, dtype, n, norm):
605609
606610 result = dpnp .fft .irfft (ia , n = n , norm = norm )
607611 expected = numpy .fft .irfft (a , n = n , norm = norm )
608- # check_only_type_kind=True since NumPy always returns float64
609- # but dpnp return float32 if input is float32
610- assert_dtype_allclose (result , expected , check_only_type_kind = True )
612+ flag = True if numpy_version () < "2.0.0" else False
613+ assert_dtype_allclose (result , expected , check_only_type_kind = flag )
611614
612615 @pytest .mark .parametrize ("dtype" , get_complex_dtypes ())
613616 @pytest .mark .parametrize ("n" , [None , 5 , 8 ])
@@ -771,8 +774,11 @@ def test_float16(self):
771774
772775 expected = numpy .fft .rfft (a )
773776 result = dpnp .fft .rfft (ia )
774- # check_only_type_kind=True since Intel NumPy returns complex128
775- assert_dtype_allclose (result , expected , check_only_type_kind = True )
777+ # TODO: change to the commented line when mkl_fft-2.0.0 is released
778+ # and bwing used with Intel NumPy >= 2.0.0
779+ flag = True
780+ # flag = True if numpy_version() < "2.0.0" else False
781+ assert_dtype_allclose (result , expected , check_only_type_kind = flag )
776782
777783 @testing .with_requires ("numpy>=2.0.0" )
778784 @pytest .mark .parametrize ("xp" , [numpy , dpnp ])
@@ -954,7 +960,8 @@ def test_1d_array(self):
954960
955961 result = dpnp .fft .irfftn (ia )
956962 expected = numpy .fft .irfftn (a )
957- # TODO: change to the commented line when mkl_fft-gh-180 is merged
963+ # TODO: change to the commented line when mkl_fft-2.0.0 is released
964+ # and bwing used with Intel NumPy >= 2.0.0
958965 flag = True
959966 # flag = True if numpy_version() < "2.0.0" else False
960967 assert_dtype_allclose (result , expected , check_only_type_kind = flag )
0 commit comments