-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Create a function to make it easy to generate a range of numbers with defined spacing.
We can copy the arguments for numpy.arange() in Python
double[] values;
values = DataGen.Range(10); // returns 10 numbers (0 through 9)
values = DataGen.Range(5, 10); // returns 5 numbers (5 through 9)
values = DataGen.Range(0, 1, 0.1); // returns 10 numbers (0.0 through 0.9)It may be useful to mark DataGen.Consecutive() as obsolete...
EDIT: let's keep Consecutive() because it's more useful than Range() when the goal is to quickly create an array of a given size. Mental math is required to predict many values Range() will return.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels