Skip to content
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

SVD unittests #674

Open
wants to merge 1 commit into
base: svd
Choose a base branch
from
Open

SVD unittests #674

wants to merge 1 commit into from

Conversation

EmDash00
Copy link

No description provided.

@EmDash00
Copy link
Author

EmDash00 commented Jul 16, 2024

Getting an odd bug on one of my unittests where one of the prints causes them to crash.

https://github.com/EmDash00/micropython-ulab/blob/5587d4e69dd7e635d5e6223aabc7019057631d2d/tests/2d/scipy/svd.py#L94

A = rng.random((15, 10))
U, S, Vh = sp.linalg.svd(A)
# print(np.dot(U * S, Vh))
B = np.dot(np.dot(U, S), Vh)
print("15x10 Random Compare:", np.max(abs(A - B)) < tol)
print()

I'm not sure why it doesn't like the print line. All the other prints in the unittest seem fine.

Either way most of the them appear to fail. Not sure why. It's likely some bug in the internal implementation. I'm currently assuming the S matrix output is 2D; however, it would be good to make it 1D. I have adjusted test cases for those already written, but they're commented out.

@v923z
Copy link
Owner

v923z commented Jul 21, 2024

OK, thanks, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants