forked from pool/python3-espressomd
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
This commit is contained in:
parent
dcc3b42643
commit
7f52a710bb
36
numpy-1.24.patch
Normal file
36
numpy-1.24.patch
Normal file
@ -0,0 +1,36 @@
|
||||
commit bff5e2703d4371f06f281d48181431558066d566
|
||||
Author: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
|
||||
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]):
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 26 19:46:39 UTC 2023 - Jean-Noel Grad <jgrad@icp.uni-stuttgart.de>
|
||||
|
||||
- added numpy-1.24.patch to fix the testsuite (see
|
||||
gh#espressomd/espresso#4635)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 15 07:47:38 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user