Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing iter_type kwarg in morphio.Morphology.iter #417

Open
eleftherioszisis opened this issue Jun 15, 2022 · 0 comments
Open

Missing iter_type kwarg in morphio.Morphology.iter #417

eleftherioszisis opened this issue Jun 15, 2022 · 0 comments

Comments

@eleftherioszisis
Copy link
Contributor

import morphio

m1 = morphio.mut.Morphology()
m1.iter(morphio.IterType.depth_first)  # works
m1.iter(iter_type=morphio.IterType.depth_first)  # works

m2 = m1.as_immutable()
m2.iter(morphio.IterType.depth_first)  # works
m2.iter(iter_type=morphio.IterType.depth_first)  # fails

Traceback:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-ab9de27952d8> in <module>
      7 m2 = m1.as_immutable()
      8 m2.iter(morphio.IterType.depth_first)  # works
----> 9 m2.iter(iter_type=morphio.IterType.depth_first)  # fails

TypeError: iter(): incompatible function arguments. The following argument types are supported:
    1. (self: morphio._morphio.Morphology, Section iterator that runs successively on every neurite
iter_type controls the order of iteration on sections of a given neurite. 2 values can be passed:
- morphio.IterType.depth_first (default)
- morphio.IterType.breadth_first (default)
iter_type: morphio._morphio.IterType = <IterType.depth_first: 0>) -> Iterator

Invoked with: <morphio._morphio.Morphology object at 0x7f3df81e73b0>; kwargs: iter_type=<IterType.depth_first: 0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant