Skip to content
Snippets Groups Projects
Commit 8752bc09 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add Branch.is_single

parent d905033c
No related branches found
No related tags found
No related merge requests found
Pipeline #14140 passed with warnings
......@@ -187,6 +187,15 @@ class Branch:
self._branch[self._keymap['id']].lazyarray(
basketcache=BASKET_CACHE), self._index_chain))
@property
def is_single(self):
"""Returns True when a single branch is selected."""
if len(self._index_chain) > 0:
if isinstance(self._index_chain[-1], (int, np.int32, np.int64)):
return True
return False
def __iter__(self):
self._iterator_index = 0
return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment