#9 Fix Python errors from numpy 1.24
Merged a year ago by jngrad. Opened a year ago by jngrad.
rpms/ jngrad/espresso f38-4.2.0-5  into  rawhide

file added
+22
@@ -0,0 +1,22 @@ 

+ diff --git a/testsuite/python/observable_profile.py b/testsuite/python/observable_profile.py

+ index 969244918..0a7b7eaff 100644

+ --- a/testsuite/python/observable_profile.py

+ +++ b/testsuite/python/observable_profile.py

+ @@ -52,5 +52,5 @@ class ProfileObservablesTest(ut.TestCase):

+          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)

+ diff --git a/testsuite/python/observable_profileLB.py b/testsuite/python/observable_profileLB.py

+ index 4a3527035..6770cea8e 100644

+ --- a/testsuite/python/observable_profileLB.py

+ +++ b/testsuite/python/observable_profileLB.py

+ @@ -92,5 +92,5 @@ class ObservableProfileLBCommon:

+          _, 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])

file modified
+8 -1
@@ -3,7 +3,7 @@ 

  

  Name:           espresso

  Version:        4.2.0

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        Extensible Simulation Package for Research on Soft matter

  # segfault on s390x: https://github.com/espressomd/espresso/issues/3753

  # segfault on armv7hl: https://src.fedoraproject.org/rpms/espresso/pull-request/4
@@ -14,6 +14,9 @@ 

  Source0:        https://github.com/%{name}md/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz

  # skip fragile ICC python interface test on aarch64

  Patch0:         %{name}-aarch64.patch

+ # fix deprecated histogram function arguments removed in numpy 1.24

+ # https://github.com/espressomd/espresso/pull/4635

+ Patch1:         %{name}-numpy.patch

  

  BuildRequires:  gcc-c++

  BuildRequires:  cmake3 >= 3.16
@@ -106,6 +109,7 @@ 

  %ifarch aarch64

  %patch0 -p1

  %endif

+ %patch1 -p1

  

  %build

  %global defopts \\\
@@ -163,6 +167,9 @@ 

  %{python3_sitearch}/mpich/%{name}md/

  

  %changelog

+ * Wed Dec 21 2022 Jean-Noël Grad <jgrad@icp.uni-stuttgart.de> - 4.2.0-5

+ - Fix Python errors from numpy 1.24

+ 

  * Tue Aug 23 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.2.0-4

  - Rebuild for gsl-2.7.1

  

no initial comment

rebased onto c7fa1d3

a year ago

Pull-Request has been merged by jngrad

a year ago
Metadata