[PyCUDA] GPUArray does not allow Python longs as shapes
irwin.zaid at physics.ox.ac.uk
Mon Oct 3 05:35:21 PDT 2011
I just found (in my opinion) what may be a bug in GPUArray. Python 2.x
has both ints and longs, and some functions (including some in numpy)
may return either depending on the input.
GPUArray, however, only likes ints as shape parameters. This seems to be
resolvable by changing line 159 in gpuarray.py from "assert
isinstance(shape, int)" to "assert isinstance(shape, (int, long))".
More information about the PyCUDA