Skip to content
Snippets Groups Projects
Commit 3e1dbf66 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

Add py-pynn version 0.9.6 and update

parent 63a91392
No related branches found
No related tags found
1 merge request!32Add py-pynn version 0.9.6 and update
......@@ -15,6 +15,7 @@ class PyPynn(PythonPackage):
pypi = "PyNN/PyNN-0.8.3.tar.gz"
git = "https://github.com/NeuralEnsemble/PyNN.git"
version('0.9.6', sha256='d85226800e30bc1692d3f84485c3fa20b921c2ab55f1201d0a3bf23432e16cd2')
version('0.9.5', sha256='91af2126b639a6a795bfc2709ac49423278c4794b6d0da143908b9afcb415f80')
version('0.9.1', sha256='bbc60fea3235427191feb2daa0e2fa07eb1c3946104c068ac8a2a0501263b0b1')
version('0.8.3', sha256='9d59e6cffa4714f0c892ec6b32d1f5f8f75ba3a20d8635bac50c047aa6f2537e')
......@@ -34,3 +35,5 @@ class PyPynn(PythonPackage):
depends_on('py-lazyarray', type=('build', 'run'), when="@0.9.0:")
depends_on('py-mock@1.0:', type='test')
patch('pynn-0.9.6-python3.patch', when='@0.9.6 ^python@3:')
diff --git a/pyNN/recording/files.py b/pyNN/recording/files.py
index 67c574ae..15404329 100644
--- a/pyNN/recording/files.py
+++ b/pyNN/recording/files.py
@@ -50,7 +50,7 @@ def savez(file, *args, **kwds):
import zipfile
from numpy.lib import format
- if isinstance(file, basestring):
+ if isinstance(file, str):
if not file.endswith('.npz'):
file = file + '.npz'
@@ -61,7 +61,7 @@ def savez(file, *args, **kwds):
raise ValueError("Cannot use un-named variables and keyword %s" % key)
namedict[key] = val
- zip = zipfile.ZipFile(file, mode="wb")
+ zip = zipfile.ZipFile(file, mode="w")
# Place to write temporary .npy files
# before storing them in the zip. We need to path this to have a working
@@ -220,7 +220,7 @@ class NumpyBinaryFile(BaseFile):
def write(self, data, metadata):
__doc__ = BaseFile.write.__doc__
self._check_open()
- metadata_array = numpy.array(metadata.items(), dtype=(str, float))
+ metadata_array = numpy.array(list(metadata.items()), dtype=object)
savez(self.fileobj, data=data, metadata=metadata_array)
def read(self):
@@ -234,7 +234,7 @@ class NumpyBinaryFile(BaseFile):
__doc__ = BaseFile.get_metadata.__doc__
self._check_open()
D = {}
- for name, value in numpy.load(self.fileobj)['metadata']:
+ for name, value in numpy.load(self.fileobj, allow_pickle=True)['metadata']:
try:
D[name] = eval(value)
except Exception:
......@@ -18,7 +18,7 @@ spack:
- nest@3.0 +python +gsl +mpi %gcc@10.3.0
- arbor +mpi ^python@3:3.9 %gcc@10.3.0
- neuron +mpi %gcc@10.3.0
- py-pynn@0.9.5 %gcc@10.3.0
- py-pynn@0.9.6 %gcc@10.3.0
- tvb-data %gcc@10.3.0
- tvb-library ^binutils+ld+gold %gcc@10.3.0
- tvb-storage ^binutils+ld+gold %gcc@10.3.0
......
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