dbbs-lab / bsb-neuron

NEURON simulation adapter for the BSB framework
GNU General Public License v3.0
0 stars 0 forks source link

Fix NeuronPopulation class issue #14

Closed filimarc closed 2 months ago

filimarc commented 3 months ago

When NeuronPopulation obj is created it needs a model, so we fix when is called in getitem

Helveg commented 2 months ago

@danilobenozzo That seems rather impossible if you were using the official versions of the software involved. How could NeuronPopulation ever be missing arguments, and how could introducing a new breaking change ever be the solution to this existing problem? That seems anachronistic ;p

danilobenozzo commented 2 months ago

How could NeuronPopulation ever be missing arguments,

since def __init__(self, model: "NeuronCell", instances: list): is it enough just passing the list as in https://github.com/dbbs-lab/bsb-neuron/blob/4fc632ce1e8306d07a351b34cb1fbd30222742a3/bsb_neuron/adapter.py#L250 ? shouldn't rather be return NeuronPopulation(self._model, [p for p, b in zip(self, item) if b]) ? or only return [p for p, b in zip(self, item) if b]

Helveg commented 2 months ago

You are right :) I didn't see that the constructor had 2 arguments :)