If I have code like this, I get an error:
import pyopencl as cl
import numpy as np
n = 3
ctx = cl.create_some_context()
queue = cl.CommandQueue(ctx)
a = np.array(range(1,10))
g_a = cl.array.to_device(queue, a)
-------------------
Traceback (most recent call last):
File "C:\Users\dom\workspace\PyDev_Test\src\subset_dot.py", line 12, in
<module>
g_a = cl.array.to_device(queue, a)
AttributeError: 'module' object has no attribute 'array'
However, if I change my imports to this, everything is OK and it runs without
error:
from pyopencl.clrandom import rand as clrand
import pyopencl as cl
import numpy as np
Dominic J. Pazzula
+-+-+-+-+-+-+-+-+-+-+-
[email protected]
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl