From f79f072b9bbc5719fbfa3d5c75e886a2bbb7f1ce Mon Sep 17 00:00:00 2001
From: "Daniel M. Pelt" <D.M.Pelt@cwi.nl>
Date: Fri, 10 Jul 2015 00:30:23 +0200
Subject: Also allow tuples to be passed in a config dict

---
 python/astra/utils.pyx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'python/astra')

diff --git a/python/astra/utils.pyx b/python/astra/utils.pyx
index 08ee67b..9d2e9ab 100644
--- a/python/astra/utils.pyx
+++ b/python/astra/utils.pyx
@@ -93,7 +93,7 @@ cdef void readDict(XMLNode root, _dc):
     dc = convert_item(_dc)
     for item in dc:
         val = dc[item]
-        if isinstance(val, list):
+        if isinstance(val, list) or isinstance(val, tuple):
             val = np.array(val,dtype=np.float64)
         if isinstance(val, np.ndarray):
             if val.size == 0:
@@ -128,7 +128,7 @@ cdef void readOptions(XMLNode node, dc):
         val = dc[item]
         if node.hasOption(item):
             raise Exception('Duplicate Option: %s' % item)
-        if isinstance(val, list):
+        if isinstance(val, list) or isinstance(val, tuple):
             val = np.array(val,dtype=np.float64)
         if isinstance(val, np.ndarray):
             if val.size == 0:
-- 
cgit v1.2.3