perfplot
perfplot copied to clipboard
[BUG] Can no longer use float increments for `n_range` argument
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.