summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-06-24 21:04:22 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-07-23 11:57:15 +0200
commit385865d6ad7a54ee294b4086d4679747f49cff2e (patch)
tree47b2eeca92140e29f713aa436fbd23278adc2bc4 /python/astra
parent4c9e432ae4581fdc110e9a9c45267227be1c7c31 (diff)
downloadastra-385865d6ad7a54ee294b4086d4679747f49cff2e.tar.gz
astra-385865d6ad7a54ee294b4086d4679747f49cff2e.tar.bz2
astra-385865d6ad7a54ee294b4086d4679747f49cff2e.tar.xz
astra-385865d6ad7a54ee294b4086d4679747f49cff2e.zip
Fix passing a python list as option
Diffstat (limited to 'python/astra')
-rw-r--r--python/astra/utils.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/astra/utils.pyx b/python/astra/utils.pyx
index 3746b8e..08ee67b 100644
--- a/python/astra/utils.pyx
+++ b/python/astra/utils.pyx
@@ -128,6 +128,8 @@ cdef void readOptions(XMLNode node, dc):
val = dc[item]
if node.hasOption(item):
raise Exception('Duplicate Option: %s' % item)
+ if isinstance(val, list):
+ val = np.array(val,dtype=np.float64)
if isinstance(val, np.ndarray):
if val.size == 0:
break