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

Add vector 2-norm test #314

Merged
merged 3 commits into from Feb 12, 2021
Merged

Add vector 2-norm test #314

merged 3 commits into from Feb 12, 2021

Conversation

ubIQio
Copy link
Contributor

@ubIQio ubIQio commented Feb 10, 2021

Fails on high tolerance if result is >10?

@v923z
Copy link
Owner

v923z commented Feb 10, 2021

@ubIQio I wouldn't get too hung up on the tolerance issue: some platforms have only floats. I would say, if you look at the results from numpy, and from ulab, and they are reasonably close, then I would accept them.

However, you have to update the expected file https://github.com/v923z/micropython-ulab/blob/master/tests/numpy/linalg.py.exp. The easiest way of doing that is to simply run the https://github.com/v923z/micropython-ulab/blob/master/build.sh script. That pulls in the latest micropython, compiles the firmware for unix, and runs the tests. At the end, if a test fails, or its expected file is not in ./tests/, then a new expected file will be generated in the root. You'll have to copy that to ./tests/numpy/ as mytest.py.exp. At that point, mytest.py.exp becomes the gold standard for mytest.py, and the results of mytest.py will in the future be compared against this file.

@v923z
Copy link
Owner

v923z commented Feb 12, 2021

@ubIQio This looks good, many thanks for your efforts!

@v923z v923z merged commit ab964b9 into v923z:master Feb 12, 2021
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.

None yet

3 participants