-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
def traverse(next):
enter = do_something() # same as the enter callback
children = next(enter)
leave = do_something_else(children) # same as leave the callback
return leave
Tree.from_swc(...).traverse(traverse)The advantage of this onion-ring API design is that users can hold a closure to easily retain some information. However, I am not quite sure if such a call would lead to a too deep call stack (in some extreme cases, a neuron may have hundreds of thousands of points).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request