[python-arrayfire] 80/250: Cleaning up variables erraneously assigned to ctypes module
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.
commit 5581632a92c87f384c4ca5b1c56e80afc8f5c9aa
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Mon Aug 31 07:00:32 2015 -0400
Cleaning up variables erraneously assigned to ctypes module
---
arrayfire/device.py | 22 +++++++++++-----------
arrayfire/util.py | 4 ++--
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/arrayfire/device.py b/arrayfire/device.py
index 6ca6a5f..d630696 100644
--- a/arrayfire/device.py
+++ b/arrayfire/device.py
@@ -14,11 +14,11 @@ def info():
safe_call(clib.af_info())
def device_info():
- ct.c_char_256 = ct.c_char * 256
- device_name = ct.c_char_256()
- backend_name = ct.c_char_256()
- toolkit = ct.c_char_256()
- compute = ct.c_char_256()
+ c_char_256 = ct.c_char * 256
+ device_name = c_char_256()
+ backend_name = c_char_256()
+ toolkit = c_char_256()
+ compute = c_char_256()
safe_call(clib.af_device_info(ct.pointer(device_name), ct.pointer(backend_name),
ct.pointer(toolkit), ct.pointer(compute)))
@@ -31,14 +31,14 @@ def device_info():
return dev_info
def get_device_count():
- ct.c_num = ct.c_int(0)
- safe_call(clib.af_get_device_count(ct.pointer(ct.c_num)))
- return ct.c_num.value
+ c_num = ct.c_int(0)
+ safe_call(clib.af_get_device_count(ct.pointer(c_num)))
+ return c_num.value
def get_device():
- ct.c_dev = ct.c_int(0)
- safe_call(clib.af_get_device(ct.pointer(ct.c_dev)))
- return ct.c_dev.value
+ c_dev = ct.c_int(0)
+ safe_call(clib.af_get_device(ct.pointer(c_dev)))
+ return c_dev.value
def set_device(num):
safe_call(clib.af_set_device(num))
diff --git a/arrayfire/util.py b/arrayfire/util.py
index afd0943..c130959 100644
--- a/arrayfire/util.py
+++ b/arrayfire/util.py
@@ -11,8 +11,8 @@ from .library import *
import numbers
def dim4(d0=1, d1=1, d2=1, d3=1):
- ct.c_dim4 = ct.c_longlong * 4
- out = ct.c_dim4(1, 1, 1, 1)
+ c_dim4 = ct.c_longlong * 4
+ out = c_dim4(1, 1, 1, 1)
for i, dim in enumerate((d0, d1, d2, d3)):
if (dim is not None): out[i] = dim
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git
More information about the debian-science-commits
mailing list