Skip to content

Relax comparison of floats in tests #818

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 3 commits into from
Dec 21, 2022

Conversation

bnavigator
Copy link
Contributor

While trying to fix python-control/Slycot#187 in python-control/Slycot#188, I ran into precision related errors of the control test suite. Seems like the new NumPy moves around some libraries affecting the floats.

There are more errors related to the frequency vector calculation of FRDs, which need to be investigated.

@bnavigator bnavigator changed the title Easy comparison of floats in tests Relax comparison of floats in tests Dec 18, 2022
@coveralls
Copy link

coveralls commented Dec 18, 2022

Coverage Status

Coverage decreased (-0.01%) to 94.803% when pulling 5352222 on bnavigator:flatsys-float-tests into 2f343be on python-control:main.

@murrayrm
Copy link
Member

Odd that we are still seeing the FRD error and that this only happens in the slycot from source version.

@murrayrm
Copy link
Member

I'm seeing some problems in my own copy of this branch. It looks like using nulps is the source of the problems, but it doesn't happen on all builds. ???

@murrayrm
Copy link
Member

It looks like the problem in the FRD tests had to do with using np.linspace to generate the list of frequencies and then specifying a subset of frequencies for testing "manually". Picking the frequencies out from the original list seems to have fixed the problem.

@bnavigator
Copy link
Contributor Author

Thank you!

@bnavigator bnavigator merged commit 56f227f into python-control:main Dec 21, 2022
@murrayrm murrayrm added this to the 0.9.3 milestone Dec 24, 2022
@bnavigator bnavigator deleted the flatsys-float-tests branch February 18, 2024 20:30
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.

Numpy 1.24 breaks compiling Slycot
3 participants