-
Couldn't load subscription status.
- Fork 1.6k
Closed
Labels
Bug in other softwareCompiler, Virtual Machine, etc. bug affecting OpenBLASCompiler, Virtual Machine, etc. bug affecting OpenBLAS
Description
Hello, I'm noticing some errors in results and nonconvergence in eigenvalue routines on mac M1. I've put together some simple test problems using numpy, scipy, and libopenblas builds from conda-forge:
import numpy as np
import numpy.linalg
import scipy.linalg
A = np.array([[0, 1j], [-1j, 0]])
test_unitary = lambda A: np.allclose(np.eye(2), A.T.conj() @ A)
w, v = numpy.linalg.eigh(A)
print("numpy.linalg.eigh:", test_unitary(v))
w, v = scipy.linalg.eigh(A)
print("scipy.linalg.eigh:", test_unitary(v))
w, v = numpy.linalg.eig(A)
print("numpy.linalg.eig:", test_unitary(v))
w, v = scipy.linalg.eig(A)
print("scipy.linalg.eig:", test_unitary(v))
B = np.eye(2)
w, v = scipy.linalg.eig(A, B)
print("scipy.linalg.eig (gen):", test_unitary(v))
With openblas 0.3.18, all of these tests pass on M1. With openblas 0.3.20 or 0.3.21, the numpy Hermitian test returns wrong results, and the scipy generalized non-Hermitian routine fails to converge. I wasn't sure if I should bring this up on the scipy/numpy or any of the conda-forge repositories, but thought I'd start here. Any thoughts?
Metadata
Metadata
Assignees
Labels
Bug in other softwareCompiler, Virtual Machine, etc. bug affecting OpenBLASCompiler, Virtual Machine, etc. bug affecting OpenBLAS