`GPUArray.__div__` does not comply with numpy
Open
bug
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 298
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
Here's an MWE:
```python
>>> 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
```python
>>> 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])
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.