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

[BUG] Can no longer use float increments for n_range argument #153

Open
zoj613 opened this issue Jun 21, 2022 · 0 comments
Open

[BUG] Can no longer use float increments for n_range argument #153

zoj613 opened this issue Jun 21, 2022 · 0 comments

Comments

@zoj613
Copy link

zoj613 commented Jun 21, 2022

Describe the bug
It seems like PR #120 (particularly this commit: 490e676 (#120) changed the behaviour of the package. I recently ran benchmark plots for a package I develop where I use float values for n_range and suddenly got unexpected behavior: The program froze! Upon further investigation I realized that the values passed to n_range were being truncated and one of them ended up being 0 (truncated from 0.1). The underlying function that is supposed to accept the value of n_range caused the interpreter to crash because 0 is forbidden given the setting of the script.

To Reproduce
Just set n_range=[0.1, 0.4, 1.5] or any float, it will get truncated to ints.

Diagnose
I may ask you to cut and paste the output of the following command.

pip freeze | grep perfplot

Ouput: perfplot==0.9.9

It seems like this change introduced by #120 is breaking. Would it be too much to ask for re-introducing this functionality? For reference, here is the script that I use in order to generate the plots and the x-axis using float values in increments of 0.4 from 0.1 to 40. From v0.9.9 on wards, This script does not work.

If I was able to resolve your problem, consider sponsoring my work on perfplot, or buy me a coffee to say thanks.

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

No branches or pull requests

1 participant