Skip to content

Commit

Permalink
fix Neuron 8.1 issue, version bump (#417)
Browse files Browse the repository at this point in the history
* fix Neuron 8.1 issue, version bump

* run all tests on maintenance/2.2.x branch
  • Loading branch information
espenhgn committed Apr 5, 2022
1 parent 670e756 commit 915e453
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Expand Up @@ -5,9 +5,9 @@ name: Python application

on:
push:
branches: [ master ]
branches: [ master, maintenance/2.2.x ]
pull_request:
branches: [ master ]
branches: [ master, maintenance/2.2.x ]

jobs:
build:
Expand Down
14 changes: 8 additions & 6 deletions LFPy/network.py
Expand Up @@ -358,7 +358,7 @@ def __init__(self, CWD=None, CELLPATH=None, first_gid=0, Cell=NetworkCell,
COMM.Barrier()

# container of Vector objects used to record times of action potentials
self.spike_vectors = []
self._hoc_spike_vectors = []

# set up population of cells on this RANK
self.gids = [
Expand Down Expand Up @@ -621,8 +621,9 @@ class defining a Cell-like object, see class NetworkCell
self.pc.cell(gid, cell._hoc_sd_netconlist[-1])

# record spike events
population.spike_vectors.append(neuron.h.Vector())
cell._hoc_sd_netconlist[-1].record(population.spike_vectors[-1])
population._hoc_spike_vectors.append(neuron.h.Vector())
cell._hoc_sd_netconlist[-1].record(
population._hoc_spike_vectors[-1])

# add population object to dictionary of populations
self.populations[name] = population
Expand Down Expand Up @@ -1208,9 +1209,10 @@ def simulate(self, probes=None,
# Collect spike trains across all RANKs to RANK 0
for name in self.population_names:
population = self.populations[name]
for i in range(len(population.spike_vectors)):
population.spike_vectors[i] = \
np.array(population.spike_vectors[i])
population.spike_vectors = []
for i in range(len(population._hoc_spike_vectors)):
population.spike_vectors += \
[population._hoc_spike_vectors[i].as_numpy()]
if RANK == 0:
times = []
gids = []
Expand Down
2 changes: 1 addition & 1 deletion LFPy/version.py
@@ -1 +1 @@
version = "2.2.5"
version = "2.2.6"

0 comments on commit 915e453

Please sign in to comment.