1
0

- Add numpy-1.24.patch to make it compatible with numpy >= 1.24

gh#EtienneCmb/tensorpac#17

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-tensorpac?expand=0&rev=10
This commit is contained in:
2023-02-08 09:41:53 +00:00
committed by Git OBS Bridge
parent d59ef6cf23
commit 0e84c9e02f
3 changed files with 25 additions and 4 deletions
+6
View File
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 8 09:35:20 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Add numpy-1.24.patch to make it compatible with numpy >= 1.24
gh#EtienneCmb/tensorpac#17
-------------------------------------------------------------------
Sat Feb 26 11:11:18 UTC 2022 - Matej Cepl <mcepl@suse.com>
+6 -4
View File
@@ -1,7 +1,7 @@
#
# spec file for package python-tensorpac
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
Name: python-tensorpac
@@ -26,6 +25,8 @@ Summary: Tensor-based phase-Amplitude coupling package
License: BSD-3-Clause
URL: https://etiennecmb.github.io/tensorpac/
Source: https://github.com/EtienneCmb/tensorpac/archive/refs/tags/v%{version}.tar.gz#/tensorpac-%{version}.tar.gz
# PATCH-FIX-OPENSUSE numpy-1.24.patch gh#EtienneCmb/tensorpac#17
Patch0: numpy-1.24.patch
BuildRequires: %{python_module joblib}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools}
@@ -51,7 +52,7 @@ Tensorpac is an Python toolbox for computing Phase-Amplitude Coupling
(PAC) using tensors and parallel computing.
%prep
%setup -q -n tensorpac-%{version}
%autosetup -p1 -n tensorpac-%{version}
chmod a-x LICENSE README.rst
# upstream tarball contains py3.7 cache files
rm -rf */__pycache__
@@ -79,6 +80,7 @@ donttest+=" or (TestUtils and test_psd)"
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/tensorpac
%{python_sitelib}/tensorpac*-info
%changelog
+13
View File
@@ -0,0 +1,13 @@
Index: tensorpac-1.1/tensorpac/gcmi.py
===================================================================
--- tensorpac-1.1.orig/tensorpac/gcmi.py
+++ tensorpac-1.1/tensorpac/gcmi.py
@@ -94,7 +94,7 @@ def nd_mi_gg(x, y):
ln2 = np.log(2)
if CONFIG['MI_BIASCORRECT']:
vec = np.arange(1, nvarxy + 1)
- psiterms = psi((ntrl - vec).astype(np.float) / 2.0) / 2.0
+ psiterms = psi((ntrl - vec).astype(float) / 2.0) / 2.0
dterm = (ln2 - np.log(ntrl - 1.0)) / 2.0
hx = hx - nvarx * dterm - psiterms[:nvarx].sum()
hy = hy - nvary * dterm - psiterms[:nvary].sum()