Skip to content

Conversation

@thchr
Copy link
Contributor

@thchr thchr commented Oct 23, 2018

This follows up on #29604 (comment): several of the doc-string'ed, exported functions (with AbstractArray inputs) from base/reducedim.jl were not included in the documentation, leading to doc-tests not being run.

I think the reasoning behind the omissions is that identically-named functions are already listed in the section on iterable collections in doc/src/base/collections.md---but those functions apply to generic iterables, so the AbstractArray-signature variants are not included. One of the downside of this is that doc-tests are not run for the AbstractArray variants.

So, in this PR, I include all the doc-string'ed, exported functions from base/reducedim.jl in the arrays.md documentation. In addition, I moved functions from the collections.md documentation to the arrays.md documentation if their type-inputs only allow AbstractArray (maximum!, minimum!, findmin!, findmax!, any!, all!, sum!, prod!, ). This latter move is perhaps not a net positive, so please let me know if that seems meaningful or not.

More broadly, let me know if the additions to arrays.md should go elsewhere (files, subsections, etc.)

@thchr thchr force-pushed the array-manual-additions branch from 2c41444 to 14dd0ce Compare October 23, 2018 01:53
@fredrikekre fredrikekre added the docs This change adds or pertains to documentation label Oct 23, 2018
@thchr
Copy link
Contributor Author

thchr commented Oct 30, 2018

@fredrikekre : I wonder if I could request a review from you, given #29604 (comment).

@fredrikekre fredrikekre self-requested a review October 30, 2018 19:12
@thchr
Copy link
Contributor Author

thchr commented Dec 4, 2018

This is obviously not a crucial PR, but I thought I'd bump it anyway as I guess it is not likely to be a particularly controversial one either.

Copy link
Member

@fredrikekre fredrikekre left a comment

Choose a reason for hiding this comment

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

Sorry, forgot about this one.

Base.findnext(::Function, ::Any, ::Integer)
Base.findprev(::Any, ::Integer)
Base.findprev(::Function, ::Any, ::Integer)
Base.findmin(::AbstractArray)
Copy link
Member

Choose a reason for hiding this comment

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

This method (and some others that you moved) work on e.g. tuples as well, but is this another docstring then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added findmin and moved findmin!: the former indeed has other methods, but for the latter, I can only find a single method signature taking (::AbstractArray, ::AbstractArray, ::AbstractArray).
The methods I removed from collections.md (and then readded to arrays.md) only had ::AbstractArray-type signature variants.
Thanks for finding time to review this!

@ViralBShah
Copy link
Member

I did a spot check on many of these, and it seems like they are now in the documentation. Please reopen if not the case, or a new PR if some things are still missing.

@ViralBShah ViralBShah closed this May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants