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

Fix fix

parent 65ca6bc1
No related branches found
Tags v0.16.1
No related merge requests found
Pipeline #14168 passed with warnings
......@@ -174,7 +174,7 @@ class Branch:
def __len__(self):
if not self._index_chain:
return len(self._branch)
elif isinstance(self._index_chain[0], (int, np.int32, np.int64)):
elif isinstance(self._index_chain[-1], (int, np.int32, np.int64)):
if len(self._index_chain) == 1:
try:
return len(self[:])
......@@ -191,11 +191,10 @@ class Branch:
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)):
if isinstance(self._index_chain[0], (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