Skip to content

Commit

Permalink
combine_neurons: only combine .alpha if all Dotprops have alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Dec 21, 2022
1 parent aa4bacf commit 4916856
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion navis/morpho/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,9 @@ def combine_neurons(*x: Union[Sequence[NeuronObject], 'core.NeuronList']
x._points = np.vstack(nl._points)

x._vect = np.vstack(nl.vect)
x._alpha = np.hstack(nl.alpha)

if not any([isinstance(n._alpha, type(None)) for n in nl]):
x._alpha = np.hstack(nl.alpha)

if any(nl.has_connectors):
x._connectors = pd.concat([n.connectors for n in nl], # type: ignore # no stubs for concat
Expand Down

0 comments on commit 4916856

Please sign in to comment.