-
Notifications
You must be signed in to change notification settings - Fork 127
Bitwise #625
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
Bitwise #625
Conversation
Yes. Unfortunately, the tests will fail now, given that |
@Derfies The bitwise tests fail, because the output is truncated. You can set the output format so: https://micropython-ulab.readthedocs.io/en/latest/ulab-ndarray.html#customising-array-printouts |
@Derfies These tests still fail: https://github.com/v923z/micropython-ulab/actions/runs/5263105317/jobs/9513625274?pr=625. I have the feeling that you're trying to compare If you do that, then you don't have the issue with the printout, either. |
Sorry @v923z I think I'm fundamentally misunderstanding the testing procedure here :( The scripts I've edited - these are meant to be executed with micropython / ulab and results saved to the identically named *.exp file alongside the test. Afterwards both these files are committed. The build system runs all test scripts and compares the output to the *.exp file and if there's a discrepancy, the build fails. Makes sense. But somewhere in between these steps the script should be executed with numpy and the result manually eyeballed to see whether the ulab result differs from the numpy result for parity's sake. Is this correct? And if this is the case, would we not want set_printoptions called in both scenarios and the output to be exactly the same so that eyeballing the results is as simple as checking whether we have a clean diff? |
Yes, that's correct.
In your last commit, the results were OK, the problem was that If you ask the question, what is more valuable, nice-looking displays of 3-by-3 matrices, or a function that does something useful for someone, then my vote would always be for the second. Given that I have a limited amount of free time, I've got to set priorities here. |
…instead of numpy. Of note - there seems to be a discrepancy between the numpy and ulab output for one of the left_shift cases.
Thanks for taking the time to clarify. Build seems to pass locally now after making some changes, with the exception of a single test for left_shift where a sign seems to have flipped. If you think it's at all useful, I could add some printing functionality to go the other way, ie make numpy's output more similar to the default ulab string representation of an array, which could possibly remove the need to check against the numpy results manually and add that instead to the build process. |
@jepler This fails with the |
@dhalbert what's the new incantation? |
@jepler Is it OK, if I merge this with the |
@Derfies Could you, please, close this PR, and open a new one against |
Is this the kind of thing you're looking for? Then all I do is make sure the output is correct when running from ulab, and after eyeballing and finding no discrepancies then we're good to go?