-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve range: refactor, support start as an optional kwarg, clearer …
…docs and error messages (#38041) Mathematically a range is uniquely determined by three out of four of start, step, stop, length. Furthermore if one assumes step=1 any combination of two others macthematically suffices to specify a range. With this PR the range function reflects this. Any combination of three (two non step) arguments will be accepted. Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Co-authored-by: Johnny Chen <johnnychen94@hotmail.com> Co-authored-by: Mark Kittisopikul <mkitti@users.noreply.github.com> Co-authored-by: Matt Bauman <mbauman@juliacomputing.com>
- Loading branch information
1 parent
c1f41ad
commit 97bd48c
Showing
4 changed files
with
154 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters