[PyCUDA] GPUArray does not allow Python longs as shapes
Irwin Zaid
irwin.zaid at physics.ox.ac.uk
Mon Oct 3 05:35:21 PDT 2011
Hi all,
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))".
Cheers,
Irwin
More information about the PyCUDA
mailing list