Skip to content

Commit 90e03e0

Browse files
committed
update deps; bump to v0.2.3
1 parent 45c6c0b commit 90e03e0

File tree

4 files changed

+1757
-1577
lines changed

4 files changed

+1757
-1577
lines changed

README.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@
531531
},
532532
{
533533
"cell_type": "code",
534-
"execution_count": 11,
534+
"execution_count": null,
535535
"metadata": {},
536536
"outputs": [
537537
{
@@ -549,10 +549,11 @@
549549
"from scipy import sparse\n",
550550
"\n",
551551
"J = sparse.lil_array((N_tot, N_tot))\n",
552-
"J[exc_synapses.i, exc_synapses.j] = J_excit\n",
552+
"# workaround for bug with b2 VariableView not working as sparse array indices\n",
553+
"J[np.array(exc_synapses.i, dtype=int), np.array(exc_synapses.j, dtype=int)] = J_excit\n",
553554
"# careful with indexing: subgroup indexing (and thus synapse.i) starts over\n",
554555
"# again with 0, despite coming from subgroup starting at index N_excit\n",
555-
"J[inhib_synapses.i + N_excit, inhib_synapses.j] = J_inhib\n",
556+
"J[np.array(inhib_synapses.i + N_excit, dtype=int), np.array(inhib_synapses.j, dtype=int)] = J_inhib\n",
556557
"J = J.tocsr()[:, :N_excit] # only need spikes onto pyramidal cells\n",
557558
"\n",
558559
"I_ampa = wslfp.spikes_to_biexp_currents(\n",

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,11 @@ The computation requires spike times and source indices, as well as a connectivi
409409
from scipy import sparse
410410

411411
J = sparse.lil_array((N_tot, N_tot))
412-
J[exc_synapses.i, exc_synapses.j] = J_excit
412+
# workaround for bug with b2 VariableView not working as sparse array indices
413+
J[np.array(exc_synapses.i, dtype=int), np.array(exc_synapses.j, dtype=int)] = J_excit
413414
# careful with indexing: subgroup indexing (and thus synapse.i) starts over
414415
# again with 0, despite coming from subgroup starting at index N_excit
415-
J[inhib_synapses.i + N_excit, inhib_synapses.j] = J_inhib
416+
J[np.array(inhib_synapses.i + N_excit, dtype=int), np.array(inhib_synapses.j, dtype=int)] = J_inhib
416417
J = J.tocsr()[:, :N_excit] # only need spikes onto pyramidal cells
417418

418419
I_ampa = wslfp.spikes_to_biexp_currents(

0 commit comments

Comments
 (0)