We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPUArray.__div__
Here's an MWE:
>>> import pycuda.autoinit >>> import pycuda.gpuarray as cu_np >>> a = cu_np.zeros(10, dtype="int32") + 1 >>> b = cu_np.zeros(10, dtype="int32") + 2 >>> a / b array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int32)
while, Numpy returns an array of 0.5's
>>> import numpy as np >>> a = np.zeros(10, "int32") + 1 >>> b = np.zeros(10, "int32") + 2 >>> a / b array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
The text was updated successfully, but these errors were encountered:
That's clearly a bug. Believe it or not, PyCUDA predates __truediv__, I think. 😲
__truediv__
Sorry, something went wrong.
There's a proposed fix for this at https://gitlab.tiker.net/inducer/pycuda/-/merge_requests/66.
No branches or pull requests
Here's an MWE:
while, Numpy returns an array of 0.5's
The text was updated successfully, but these errors were encountered: