I don't quite understand this behavior, and was hoping someone else might
have some insight.
>>> import numpy as np
>>> import pycuda.autoinit
>>> from pycuda import gpuarray as ga
>>> a = ga.to_gpu(np.ones(10))
>>> b = np.float64(1.0)
>>> c = b + a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/proj/chroma_env/local/lib/python2.7/site-packages/pycuda/gpuarray.py",
line 690, in __getitem__
raise ValueError("non-slice indexing not supported: %s" % (idx,))
ValueError: non-slice indexing not supported: 0
>>> c = float(b) + a
It seems like adding a numpy.float64 number to a gpuarray is causing
something to try and access individual items from the gpuarray, while
adding a regular python float doesn't.
I'm using PyCUDA version (2012,1) and the graphics card is a geforce gtx550
Ti on Ubuntu 12.04 linux.
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda