Fix irfft test input check condition
@@ -1105,8 +1105,8 @@ class TestRfft2(unittest.TestCase):
norm=self.norm)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
@@ -1148,8 +1148,8 @@ class TestRfft2(unittest.TestCase):
x, s=self.s, axes=self.axes, norm=self.norm, **kw)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
@@ -1203,8 +1203,8 @@ class TestRfft2(unittest.TestCase):
out = _fft_module(xp).irfft2(x, s=self.s, axes=self.axes)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
@@ -1361,8 +1361,8 @@ class TestRfftn(unittest.TestCase):
norm=self.norm)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
@@ -1404,8 +1404,8 @@ class TestRfftn(unittest.TestCase):
x, s=self.s, axes=self.axes, norm=self.norm, **kw)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
@@ -1459,8 +1459,8 @@ class TestRfftn(unittest.TestCase):
out = _fft_module(xp).irfftn(x, s=self.s, axes=self.axes)
# CUDA 10.1 and above may modify input, this fails for complex64
- if (cp.cuda.runtime.runtimeGetVersion() <= 10000 and
- dtype is np.complex64):
+ if (cp.cuda.runtime.runtimeGetVersion() <= 10000 or
+ dtype is not np.complex64):
testing.assert_array_equal(x, x_orig)
return _correct_np_dtype(xp, dtype, out)
