Open Tom-Willemsen opened 3 weeks ago
We could provide the scientists with our own generator that takes both (start, stop, step) or (start, stop, num) and "does the right thing" and they then use this and not worry about linspace / arange?
For reference, diamond have logic that looks something like "if end point would be within 1% of adding step to start N times, include it, otherwise don't". We may wish to implement something similar.
Have a look in other general/numeric python packages for similar functionality before implementing this ourselves.
Issue Description
https://github.com/search?q=repo%3AISISComputingGroup%2FScriptDefinitions%20arange&type=code
replace usage of
np.arange
with another suitable functionNote that this will either need:
start, stop, num
rather thanstart, stop, step
and usenp.linspace
arange
-like behaviour but includestop
if it's within 1% of adding step to start N times, measure it separately otherwise (this is roughly what diamond do for example)Acceptance Criteria
np.linspace
or another suitable function used in preference tonp.arange
How to Review
Before making a PR...
If not applicable, write "Not applicable"
To the reviewer: Make sure to update submodules!