summaryrefslogtreecommitdiffstats
path: root/samples/python/s021_pygpu.py
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-01-09 14:46:14 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-01-09 15:17:44 +0100
commitf7037ad8af95af569649cff0afba97babebe9425 (patch)
tree5867fde6d740904a5b3a9af33c0b4ba3a130efad /samples/python/s021_pygpu.py
parentf757ae3a98b49b34bbf08ab53e5724d17000e7c9 (diff)
downloadastra-f7037ad8af95af569649cff0afba97babebe9425.tar.gz
astra-f7037ad8af95af569649cff0afba97babebe9425.tar.bz2
astra-f7037ad8af95af569649cff0afba97babebe9425.tar.xz
astra-f7037ad8af95af569649cff0afba97babebe9425.zip
Add geom_size, geom_2vec to main astra module
Diffstat (limited to 'samples/python/s021_pygpu.py')
-rw-r--r--samples/python/s021_pygpu.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/python/s021_pygpu.py b/samples/python/s021_pygpu.py
index db6584b..95a3062 100644
--- a/samples/python/s021_pygpu.py
+++ b/samples/python/s021_pygpu.py
@@ -37,12 +37,12 @@ angles = np.linspace(0, 2 * np.pi, 180, False)
proj_geom = astra.create_proj_geom('cone', 1.0, 1.0, 128, 192, angles, 1000, 0)
# Create a simple hollow cube phantom, as a pygpu gpuarray
-vol_gpuarr = pygpu.gpuarray.zeros(astra.functions.geom_size(vol_geom), dtype='float32')
+vol_gpuarr = pygpu.gpuarray.zeros(astra.geom_size(vol_geom), dtype='float32')
vol_gpuarr[17:113, 17:113, 17:113] = 1
vol_gpuarr[33:97, 33:97, 33:97] = 0
# Create a pygpu gpuarray for the output projection data
-proj_gpuarr = pygpu.gpuarray.zeros(astra.functions.geom_size(proj_geom), dtype='float32')
+proj_gpuarr = pygpu.gpuarray.zeros(astra.geom_size(proj_geom), dtype='float32')
# Create the astra GPULink objects and create astra data3d objects from them
z, y, x = proj_gpuarr.shape