BlueBrain / morph-tool

https://morph-tool.readthedocs.org/
GNU Lesser General Public License v3.0
8 stars 7 forks source link

multiple axon grafting exception #15

Closed arnaudon closed 3 years ago

arnaudon commented 4 years ago

Just got this thrown at me on some cells with apparently 2 axons:

https://github.com/BlueBrain/morph-tool/blob/master/morph_tool/graft.py#L31

it seems to work with any number of axons, as it returns [0], why raising an exception, and not something like L.warning('more than one axon, be careful!') ?

wizmer commented 4 years ago

The question is how do you choose which axon to replace if you have many ?

arnaudon commented 4 years ago

It takes the first one in the list, which is reasonable I think. Afaik, there should not be several axons, but if there is taking the first one should work, with a warning of course!

arnaudon commented 3 years ago

solved here: https://github.com/BlueBrain/morph-tool/pull/35#discussion_r522823537