-
Notifications
You must be signed in to change notification settings - Fork 30
Cleans up elementwise function docstrings #1559
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
Conversation
- abs input does not need to be numeric, as booleans are accepted
- Add can take `bool` inputs, not just numeric.
…unctions - proj expects complex inputs and does not always return the same data type as the original input - conj expects numeric inputs and does not return booleans - real, imag take any data type
- Round now notes that ties are rounded to the nearest even integer and no longer claims to always return the same data type - Floor does not always return the same data type - Ceil does not always return the same data type
- comparison functions expect any data type - divide expects floating-point data types
- log1p, logaddexp, and expm1 docstrings are now more descriptive - input types corrected in all cases
- input types corrected - 'check' changed to 'test'
- Fixed spacing throughout docstrings
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_33 ran successfully. |
@@ -954,10 +964,12 @@ | |||
# U20: ==== LOG (x) | |||
_log_docstring = """ | |||
log(x, out=None, order='K') | |||
Computes the natural logarithm element-wise. | |||
|
|||
Computes the natural logarithm for each element `x_i` of input array `x`. |
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.
If we used "Test if each element ..." above, we should be consistent and use "Compute the natural logarithm ...".
No need to change it in this PR, but we should make a note of this and apply changes eventually.
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 tackling these changes @ndgrigorian
This PR is good to go in.
This pull request makes a number of changes to the docstrings of element-wise functions, with a focus on guaranteeing that the information in the docstrings is correct and removing typos.
Each function, when referencing expected data types of inputs, now refers to the types which will not be cast. For example,
dpt.divide
arguments now state that they expect floating-point data, as otherwise, the data will be copied and cast.