SHA256
1
0
forked from pool/python-PyCBC

Compare commits

2 Commits

3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
---
pycbc/conversions.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: pycbc-2.5.1/pycbc/conversions.py
===================================================================
--- pycbc-2.5.1.orig/pycbc/conversions.py
+++ pycbc-2.5.1/pycbc/conversions.py
@@ -77,7 +77,8 @@ def ensurearray(*args):
inputs was an array.
"""
input_is_array = any(isinstance(arg, numpy.ndarray) for arg in args)
- args = numpy.broadcast_arrays(*args)
+ # For numpy >= 2, broadcast_arrays returns tuple instead of list
+ args = list(numpy.broadcast_arrays(*args))
args.append(input_is_array)
return args

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 15 14:03:59 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- Add python-PyCBC-tests-numpy-2.0-compat.patch for compatibility
with numpy >= 2.0 in tests.
-------------------------------------------------------------------
Sat Aug 17 05:29:48 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>

View File

@@ -36,6 +36,8 @@ Summary: Core library to analyze gravitational-wave data
License: GPL-3.0-or-later
URL: http://www.pycbc.org/
Source0: https://github.com/gwastro/pycbc/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python-PyCBC-tests-numpy-2.0-compat.patch badshah400@gmail.com -- Fix appending to numpy.broadcast_arrays output for numpy >= 2.0
Patch1: python-PyCBC-tests-numpy-2.0-compat.patch
BuildRequires: %{python_module Cython >= 0.29}
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module numpy-devel >= 1.16.0}