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

Cleanup

parent 8635a110
No related branches found
No related tags found
1 merge request!27Refactor offline I/O
......@@ -105,22 +105,11 @@ class Branch:
def __getitem__(self, item):
"""Slicing magic"""
if isinstance(item, (int, slice, tuple)):
return self.__class__(self._tree,
self._mapper,
index_chain=self._index_chain + [item],
keymap=self._keymap,
subbranchmaps=self._subbranchmaps)
# if isinstance(item, tuple):
# return self[item[0]][item[1]]
if isinstance(item, str):
return self.__getkey__(item)
return self.__class__(self._tree,
self._mapper,
index_chain=self._index_chain + [np.array(item)],
index_chain=self._index_chain + [item],
keymap=self._keymap,
subbranchmaps=self._subbranchmaps)
......
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