-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Move some docstrings from helpdb to function definitions #22520
Conversation
pointer(array [, index]) | ||
|
||
Get the native address of an array or string element. Be careful to ensure that a Julia | ||
reference to `a` exists as long as this pointer will be used. This function is "unsafe" like |
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.
the variable name a isn't referenced in the signature, might make more sense if consistent
I wonder if some of these docstrings occur before enough of the documentation system itself has been loaded (which would explain the CI problems). |
So the easiest way forward would be to move some of the stuff ( |
|
||
Read binary data from an I/O stream or file, filling in `array`. | ||
""" | ||
@noinline function read!(s::IO, a::Array{T}) where T # mark noinline to ensure the array is gc-rooted somewhere (by the caller) |
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.
Just curious, any reason these functions where moved down? :)
assert(cond) | ||
|
||
Throw an [`AssertionError`](@ref) if `cond` is `false`. | ||
Also available as the macro `@assert expr`. |
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.
perhaps only ... as the macro [`@assert`](@ref).
? (given that @assert
is documented)
the same object. `fill!(A, Foo())` will return `A` filled with the result of evaluating | ||
`Foo()` once. | ||
|
||
```jldoctest |
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.
While you are at it, perhaps add an # Examples
heading before the doctests (as in #22522)? :)
Thanks for reviewing, I hope it's okay! :)