-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
BUG: Fix np.einsum errors on Power9 Linux and z/Linux. #14692
Copy link
Copy link
Closed
Labels
Description
An array index fails on Power9 Linux and z/Linux.
PR follows this issue, but not sure that x86 will be happy with the proposed fix
Reproducing code example:
(qdev_venv) [linux1@jwoehr1 Qiskit]$ python
Python 3.6.8 (default, Jun 11 2019, 14:52:20)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> tensor = np.random.rand(10, 10, 10, 10)
>>> np.einsum('ijij->', tensor)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<__array_function__ internals>", line 6, in einsum
File "/home/linux1/work/Qiskit/qdev_venv/lib64/python3.6/site-packages/numpy/core/einsumfunc.py", line 1356, in einsum
return c_einsum(*operands, **kwargs)
ValueError: dimensions in operand 0 for collapsing index 'þ' don't match (-1419377904 != 10)
>>>
Error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<__array_function__ internals>", line 6, in einsum
File "/home/linux1/work/Qiskit/qdev_venv/lib64/python3.6/site-packages/numpy/core/einsumfunc.py", line 1356, in einsum
return c_einsum(*operands, **kwargs)
ValueError: dimensions in operand 0 for collapsing index 'þ' don't match (-1419377904 != 10)
Numpy/Python version information:
1.17.2 3.6.8 (default, Jun 11 2019, 14:52:20)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Reactions are currently unavailable