Skip to content
Snippets Groups Projects
Commit 33bc2aef authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

py-pynn: add patch for numpy@1:24:

parent d86c095c
No related branches found
No related tags found
1 merge request!492Draft: py-pynn: add patch for numpy@1.24:
Pipeline #27572 failed with stage
in 1 hour, 53 minutes, and 38 seconds
......@@ -61,6 +61,7 @@ class PyPynn(PythonPackage):
depends_on("py-pytest", type='test', when="@0.11.0:")
patch('pynn-0.9.6-python3.patch', when='@0.9.6 ^python@3:')
patch('pynn-numpy-1.24.patch', when='@0.9.6: ^py-numpy@1.24:')
# neuroml and nineml are optional dependencies. Leave out of import_modules to avoid errors in tests
skip_modules = ['pyNN.neuroml', 'pyNN.nineml', 'pyNN.hardware']
......
diff --git a/pyNN/brian2/projections.py b/pyNN/brian2/projections.py
index 9fad3b9e..89f98dcf 100644
--- a/pyNN/brian2/projections.py
+++ b/pyNN/brian2/projections.py
@@ -169,8 +169,8 @@ class Projection(common.Projection):
if isinstance(self.pre, common.Assembly):
boundaries = np.cumsum([0] + [p.size for p in self.pre.populations])
assert indices.max() < boundaries[-1]
- partitions = np.split(indices, np.searchsorted(
- indices, boundaries[1:-1])) - boundaries[:-1]
+ partitions = np.array(np.split(indices, np.searchsorted(
+ indices, boundaries[1:-1])), dtype=object) - boundaries[:-1]
for i_group, local_indices in enumerate(partitions):
if isinstance(self.pre.populations[i_group], common.PopulationView):
partitions[i_group] = self.pre.populations[i_group].index_in_grandparent(
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment