From 7f52a710bbc536bb3ff2dbcc58cdafe3a552fd88e66f530d0269f5860b0596cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 27 Jan 2023 09:39:21 +0000 Subject: [PATCH] Accepting request 1061418 from home:jngrad:branches:devel:languages:python:numeric Fixed testsuite for numpy 1.24 OBS-URL: https://build.opensuse.org/request/show/1061418 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python3-espressomd?expand=0&rev=42 --- numpy-1.24.patch | 36 ++++++++++++++++++++++++++++++++++++ python3-espressomd.changes | 6 ++++++ python3-espressomd.spec | 4 +++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 numpy-1.24.patch diff --git a/numpy-1.24.patch b/numpy-1.24.patch new file mode 100644 index 0000000..228c500 --- /dev/null +++ b/numpy-1.24.patch @@ -0,0 +1,36 @@ +commit bff5e2703d4371f06f281d48181431558066d566 +Author: Jean-Noël Grad +Date: Tue Dec 20 19:36:34 2022 +0100 + +tests: Replace deprecated numpy option + +Option 'normed' in numpy.histogramdd was deprecated since 1.15 and +removed in 1.24. + +--- + testsuite/python/observable_profile.py | 2 +- + testsuite/python/observable_profileLB.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/testsuite/python/observable_profile.py ++++ b/testsuite/python/observable_profile.py +@@ -51,7 +51,7 @@ def test_density_profile(self): + obs_bin_centers = density_profile.bin_centers() + np_hist, np_edges = tests_common.get_histogram( + np.copy(self.system.part.all().pos), self.kwargs, 'cartesian', +- normed=True) ++ density=True) + np_hist *= len(self.system.part) + np.testing.assert_array_almost_equal(obs_data, np_hist) + for i in range(3): +--- a/testsuite/python/observable_profileLB.py ++++ b/testsuite/python/observable_profileLB.py +@@ -91,7 +91,7 @@ def test_velocity_profile(self): + obs_edges = obs.call_method("edges") + _, np_edges = tests_common.get_histogram( + np.zeros([1, 3]), LB_VELOCITY_PROFILE_PARAMS, 'cartesian', +- normed=True) ++ density=True) + for i in range(3): + np.testing.assert_array_almost_equal(obs_edges[i], np_edges[i]) + for x in range(obs_data.shape[0]): diff --git a/python3-espressomd.changes b/python3-espressomd.changes index 8546211..09193a8 100644 --- a/python3-espressomd.changes +++ b/python3-espressomd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 26 19:46:39 UTC 2023 - Jean-Noel Grad + +- added numpy-1.24.patch to fix the testsuite (see + gh#espressomd/espresso#4635) + ------------------------------------------------------------------- Thu Sep 15 07:47:38 UTC 2022 - Guillaume GARDET diff --git a/python3-espressomd.spec b/python3-espressomd.spec index af3c7f7..9944581 100644 --- a/python3-espressomd.spec +++ b/python3-espressomd.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2014 Christoph Junghans # # All modifications and additions to the file contributed by third parties @@ -52,6 +52,8 @@ Patch2: hdf5.patch Patch3: rpath.patch # PATCH-FIX-UPSTREAM fix-broken-fft-check.patch gh#espressomd/espresso#4567 Patch4: fix-broken-fft-check.patch +# PATCH-FIX-UPSTREAM numpy-1.24.patch gh#espressomd/espresso#4635 +Patch5: numpy-1.24.patch # According to gh#espressomd/espresso#4537 32bit architectures are not supported any more ExcludeArch: %{ix86} BuildRequires: cmake