navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.TreeNeuron.prune_twigs
          • TreeNeuron.prune_twigs()

    navis.TreeNeuron.prune_twigs¶

    TreeNeuron.prune_twigs(size, inplace=False, recursive=False)[source]¶

    Prune terminal twigs under a given size.

    Parameters:
    • size (int | float) – Twigs shorter than this will be pruned.

    • inplace (bool, optional) – If False, pruning is performed on copy of original neuron which is then returned.

    • recursive (int | bool | "inf", optional) – If int will undergo that many rounds of recursive pruning. Use float("inf") to prune until no more twigs under the given size are left.

    Return type:

    Optional[TreeNeuron]

    See also

    prune_twigs()

    This is the base function. See for details and examples.

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.