Skip to content
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

Fix some signatures and add examples for Random docs #29119

Merged
merged 1 commit into from
Sep 12, 2018

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Sep 10, 2018

You totally can give randsubseq{!} an rng argument!

@kshyatt kshyatt added the domain:docs This change adds or pertains to documentation label Sep 10, 2018

Like [`randsubseq`](@ref), but the results are stored in `S`
(which is resized as needed).

# Examples
```julia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jldoctest?


Return a vector consisting of a random subsequence of the given array `A`, where each
element of `A` is included (in order) with independent probability `p`. (Complexity is
linear in `p*length(A)`, so this function is efficient even if `p` is small and `A` is
large.) Technically, this process is known as "Bernoulli sampling" of `A`.

# Examples
```julia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jldoctest?

@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 11, 2018

OK! Think I fixed that, sorry.

@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 12, 2018

Good to go?

@fredrikekre fredrikekre merged commit 3608e50 into master Sep 12, 2018
@fredrikekre fredrikekre deleted the ksh/docfixrandom branch September 12, 2018 14:34
KristofferC pushed a commit that referenced this pull request Sep 12, 2018
@KristofferC KristofferC mentioned this pull request Sep 12, 2018
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants