From 740c9c770f97493361287467bb4dc4445d99dfad Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Wed, 4 Mar 2020 15:50:37 +0100
Subject: [PATCH] Add docstring

---
 km3io/offline.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/km3io/offline.py b/km3io/offline.py
index 70f6887..8548784 100644
--- a/km3io/offline.py
+++ b/km3io/offline.py
@@ -226,6 +226,15 @@ class OfflineReader:
 
     @classmethod
     def from_index(cls, source, index):
+        """Create an instance with a subtree of a given index
+
+        Parameters
+        ----------
+        source: ROOTDirectory
+            The source file.
+        index: index or slice
+            The index or slice to create the subtree.
+        """
         instance = cls(fobj=source._fobj, data=source._data[index])
         return instance
 
-- 
GitLab