-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Doc] API documentation updates. #23069
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
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.
nice!
| /// | ||
| /// - Parameter numpyArray: The `numpy.ndarray` instance to convert. | ||
| /// - Precondition: The `numpy` Python package must be installed. | ||
| /// - Precondition: `numpyArray` must be 1-D and have a compatible scalar |
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.
do you want to more explicitly describe when a nil value will be returned? Same for other APIs below.
Precondition usually describes cases where the code will lead to undefined behavior (e.g. crash) when the condition is violated.
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.
+1. Precondition is definitely not the right term for describing nil. We should look at how common failable initializers are documented in the standard library.
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 great catch!
A Returns: comment is typically used to describe failable initializers and when they return nil.
Updated in e7920e4, following this stdlib documentation.
|
@swift-ci Please test tensorflow |
* [Doc] API documentation updates.
Assorted documentation updates.