-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Closed
Closed
Copy link
Labels
00 - Bugcomponent: SIMDIssues in SIMD (fast instruction sets) code or machineryIssues in SIMD (fast instruction sets) code or machinery
Description
Describe the issue:
The bug appears when the divisor is a scalar, ceil(log2(divisor)) == 8 and the dividend length >= 64 or 32 or 16 depend on the enabled SIMD extension e.g. on AVX2 length >= 32
Reproduce the code example:
>>> import numpy as np
>>> np.arange(0, 32, dtype=np.uint8) // 132 # ceil(log2(132)) == 8
array([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0], dtype=uint8)
>>> # while it should return the following instead
>>> np.arange(0, 32, dtype=np.uint16) // 132
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=uint16)
Error message:
No response
NumPy/Python version information:
1.21.3 3.9.5 (default, May 19 2021, 11:32:47)
[GCC 10.2.0]
Metadata
Metadata
Assignees
Labels
00 - Bugcomponent: SIMDIssues in SIMD (fast instruction sets) code or machineryIssues in SIMD (fast instruction sets) code or machinery