diff --git a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py index d2ad696b36..01f2e99e32 100644 --- a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py +++ b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py @@ -123,7 +123,7 @@ def __init__( L = np.array([self.L] * ndim, dtype=float) # get local mesh - X = np.ogrid[self.fft.local_slice(False)] + X = list(np.ogrid[self.fft.local_slice(False)]) N = self.fft.global_shape() for i in range(len(N)): X[i] = X[i] * L[i] / N[i] @@ -135,7 +135,7 @@ def __init__( k = [np.fft.fftfreq(n, 1.0 / n).astype(int) for n in N[:-1]] k.append(np.fft.rfftfreq(N[-1], 1.0 / N[-1]).astype(int)) K = [ki[si] for ki, si in zip(k, s)] - Ks = np.meshgrid(*K, indexing='ij', sparse=True) + Ks = list(np.meshgrid(*K, indexing='ij', sparse=True)) Lp = 2 * np.pi / L for i in range(ndim): Ks[i] = (Ks[i] * Lp[i]).astype(float) diff --git a/pySDC/implementations/problem_classes/generic_MPIFFT_Laplacian.py b/pySDC/implementations/problem_classes/generic_MPIFFT_Laplacian.py index 0142045340..883494a6bf 100644 --- a/pySDC/implementations/problem_classes/generic_MPIFFT_Laplacian.py +++ b/pySDC/implementations/problem_classes/generic_MPIFFT_Laplacian.py @@ -102,7 +102,7 @@ def __init__( ) # get local mesh - X = self.xp.ogrid[self.fft.local_slice(False)] + X = list(self.xp.ogrid[self.fft.local_slice(False)]) N = self.fft.global_shape() for i in range(len(N)): X[i] = x0 + (X[i] * L[i] / N[i]) @@ -113,7 +113,7 @@ def __init__( N = self.fft.global_shape() k = [self.xp.fft.fftfreq(n, 1.0 / n).astype(int) for n in N] K = [ki[si] for ki, si in zip(k, s)] - Ks = self.xp.meshgrid(*K, indexing='ij', sparse=True) + Ks = list(self.xp.meshgrid(*K, indexing='ij', sparse=True)) Lp = 2 * np.pi / self.L for i in range(self.ndim): Ks[i] = (Ks[i] * Lp[i]).astype(float) diff --git a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_verification.py b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_verification.py index 8ade08fb4c..7cabcee841 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_verification.py +++ b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_verification.py @@ -182,7 +182,9 @@ def main(nprocs_space=None, cwd='.'): print(f'Order of accuracy: {orders[-1]:4.2f}\n') assert errors[2 + 1] < 8e-10, f'Errors are too high, got {errors[2 + 1]}' - assert np.isclose(orders[1], 4.6, rtol=7e-02), f'Order of accuracy is not within tolerance, got {orders[1]}' + assert np.isclose( + orders[1].view(np.ndarray), 4.6, rtol=7e-02 + ), f'Order of accuracy is not within tolerance, got {orders[1]}' if __name__ == "__main__": diff --git a/pySDC/projects/DAE/tests/test_SemiImplicitDAE.py b/pySDC/projects/DAE/tests/test_SemiImplicitDAE.py index ccd37ebec1..6f69448cf1 100644 --- a/pySDC/projects/DAE/tests/test_SemiImplicitDAE.py +++ b/pySDC/projects/DAE/tests/test_SemiImplicitDAE.py @@ -207,7 +207,7 @@ def testComputeEndpoint(quad_type): L.sweep.compute_end_point() - assert np.isclose(L.u[-1], L.uend), "Endpoint is not computed correctly!" + assert np.allclose(L.u[-1], L.uend), "Endpoint is not computed correctly!" @pytest.mark.base diff --git a/pySDC/projects/parallelSDC/environment.yml b/pySDC/projects/parallelSDC/environment.yml index 1961bb5c3b..7d5baaebbd 100644 --- a/pySDC/projects/parallelSDC/environment.yml +++ b/pySDC/projects/parallelSDC/environment.yml @@ -7,7 +7,7 @@ channels: dependencies: - numpy>=1.15.4 - scipy>=0.17.1 - - matplotlib>=3.0,<=3.5.3 + - matplotlib>=3.0 - dill>=0.2.6 - mpich - mpi4py>=3.0.0