-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Closed
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issues
Milestone
Description
Describe the issue:
Starting with numpy-1.21.0 (at least some) einsum operations for arrays with dtype=np.float16 yield all zero results.
Reproduce the code example:
import numpy as np
a = (np.linspace(0, 301, 300).reshape(10, 10, 3) / 301).astype(np.float16)
mat = np.array([[0.39, 0.54, 0.0089], [0.07, 0.96, 0.001], [0.02, 0.13, 0.94]], dtype=np.float16)
assert np.all((a @ mat.T) != 0)
assert np.all(np.einsum("ij, ...j", mat.astype(np.float32), a.astype(np.float32)) != 0)
assert np.all(np.einsum("ij, ...j", mat, a) != 0)Error message:
No response
NumPy/Python version information:
1.21.2 3.8.12 (default, Oct 12 2021, 13:49:34)
[GCC 7.5.0]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issues