-
Notifications
You must be signed in to change notification settings - Fork 178
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
[stdlib_math] Add arange function. #480
Conversation
This looks like a useful addition, but the name |
This comment has been minimized.
This comment has been minimized.
Update related docs.
I will review this one. |
Thanks for your review! @Jim-215-Fisher |
After reading numpy's documents, I understand that Another question is whether this function is elemental. If it is, why not change "pure" to "elemental"? In numpy, 'arange' is suitable to array arguments. |
This comment has been minimized.
This comment has been minimized.
You are right. numpy.arange does not support array argument. Never mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR! I think the API is mostly good, I gave some naming suggestions to use instead of by
, and I think there is an issue with using present()
inside merge()
, so I suggested using optval()
instead.
1. `merge` -> `optval` inside. 2. `by` -> `step` argument name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing, looks good to me.
With 3 approvals, I'll go ahead and merge. Thank you @zoziha and reviewers! |
Description
seq
returns evenly spaced values within a given interval.seq
function. (see numpy/arange)(the API name
seq
needs to be discussed,arange
? I thinkseq
is better, it is shorter.)(aready to
arange
🔰)Tasks
by <= 0
condition. (see [stdlib_math] Add arange function. #480 (comment))stdlib_math
orstdlib_linalg
:stdlib_math
is better.floor
orceiling
function: I thinkfloor
is better. (see [stdlib_math] Add arange function. #480 (comment))by
value is a very small amount. (Need to discuss) (see [stdlib_math] Add arange function. #480 (comment)) (let users judge😏)More routines to do, not this PR
see #476.