Skip to content

Implementation of np.linalg.eig #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Dec 15, 2020
Merged

Conversation

reazulhoque
Copy link
Contributor

This PR will allow users to compute np.linalg.eig on accelerator devices. We enable this support throught dpnp.

According to https://numpy.org/doc/stable/reference/generated/numpy.linalg.eig.html, NumPy does not order the eigen values. Dpnp provides support of np.linalg.eig through MKL which returns the eigen values in order. To check the correctness of our implementation we have borrowed the check from dpnp, where we sort the eigen values for both our implementation and NumPy's. The eigen vectors are corresponding to each eigen value and we swap the vectors accordingly when we sort the eigen values. The eigen vectors could be in different directions which we correct in our test as well.

@diptorupd @oleksandr-pavlyk Please let me know if the explanation makes sense.

@diptorupd diptorupd merged commit d7a433b into IntelPython:main Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants