From bc84773405c6aa97e0bbac1f61ab8f900cb5b4dd Mon Sep 17 00:00:00 2001
From: zineb aly <aly.zineb.az@gmail.com>
Date: Tue, 26 May 2020 09:30:39 +0200
Subject: [PATCH] make yapf

---
 km3io/rootio.py     | 7 +++----
 km3io/tools.py      | 4 ++--
 tests/test_tools.py | 3 ++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/km3io/rootio.py b/km3io/rootio.py
index a3b3028..ffaf69f 100644
--- a/km3io/rootio.py
+++ b/km3io/rootio.py
@@ -143,8 +143,7 @@ class Branch:
                 self._branch[self._keymap[key]]._context, 6)
 
         out = self._branch[self._keymap[key]].lazyarray(
-            interpretation=interpretation,
-            basketcache=BASKET_CACHE)
+            interpretation=interpretation, basketcache=BASKET_CACHE)
         if self._index_chain is not None and key in self._mapper.toawkward:
             cache_key = self._mapper.name + '/' + key
             if cache_key not in self._awkward_cache:
@@ -159,8 +158,8 @@ class Branch:
         if isinstance(item, str):
             return self.__getkey__(item)
 
-        if item.__class__.__name__ == "ChunkedArray":
-            item = np.array(item)
+        # if item.__class__.__name__ == "ChunkedArray":
+        #     item = np.array(item)
 
         return self.__class__(self._tree,
                               self._mapper,
diff --git a/km3io/tools.py b/km3io/tools.py
index 5abeba7..f664db0 100644
--- a/km3io/tools.py
+++ b/km3io/tools.py
@@ -59,7 +59,7 @@ def unique(array, dtype=np.int64):
     out[entry_idx] = last
     for i in range(1, n):
         current = array[i]
-        if current == last: # shortcut for sorted arrays
+        if current == last:  # shortcut for sorted arrays
             continue
         already_present = False
         for j in range(entry_idx + 1):
@@ -70,7 +70,7 @@ def unique(array, dtype=np.int64):
             entry_idx += 1
             out[entry_idx] = current
         last = current
-    return out[:entry_idx+1]
+    return out[:entry_idx + 1]
 
 
 @nb.jit(nopython=True)
diff --git a/tests/test_tools.py b/tests/test_tools.py
index 9d0517a..5306f42 100644
--- a/tests/test_tools.py
+++ b/tests/test_tools.py
@@ -12,7 +12,8 @@ class TestUnique(unittest.TestCase):
         max_range = 100
         for i in range(23):
             low = np.random.randint(0, max_range)
-            high = np.random.randint(low + 1, low + 2 + np.random.randint(max_range))
+            high = np.random.randint(low + 1,
+                                     low + 2 + np.random.randint(max_range))
             n = np.random.randint(max_range)
             arr = np.random.randint(low, high, n).astype(dtype)
             np_reference = np.sort(np.unique(arr))
-- 
GitLab