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

add documentation for [Abstract]Vector/[Abstract]Matrix #22674

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

fredrikekre
Copy link
Member

No description provided.

base/array.jl Outdated
const AbstractVector{T} = AbstractArray{T,1}
"""
Copy link
Member

Choose a reason for hiding this comment

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

A line break before this would be good for readability.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@@ -877,7 +878,7 @@ end
getindex(A, inds...)

Return a subset of array `A` as specified by `inds`, where each `ind` may be an
`Int`, a `Range`, or a `Vector`. See the manual section on
`Int`, a `Range`, or a [`Vector`](@ref). See the manual section on
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps Range should also get a ref? (Int is probably fine without one.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Range does not have a docstring, so leaving that one out.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, didn't realize. That's too bad.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps documenting Range deserves an intro issue?


Abstract array supertype which arrays inherit from.
Abstract `N`-dimensional array supertype with elements of type `T`
which arrays inherit from.
Copy link
Member

Choose a reason for hiding this comment

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

I know this is how it was before, but personally I find this wording quite awkward. Perhaps it would be worth clarifying it a bit while you're in here? Maybe something like

Abstract N-dimensional array supertype containing elements of type T. Arrays and some array-like objects inherit from this type.

? Up to you if you want to change it right now though.

Copy link
Member Author

@fredrikekre fredrikekre Jul 5, 2017

Choose a reason for hiding this comment

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

I was the one adding the apparently awkward wording in #22052 so might as well update it. (Edit: Done.)

base/array.jl Outdated
const Vector{T} = Array{T,1}
"""
Copy link
Member

Choose a reason for hiding this comment

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

A line break would be nice here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@ararslan ararslan added arrays [a, r, r, a, y, s] docs This change adds or pertains to documentation labels Jul 4, 2017
@fredrikekre fredrikekre force-pushed the fe/doc-matrix-vector branch from 1df045f to fabf9e5 Compare July 5, 2017 07:00
Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

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

Great work here as always!

@fredrikekre
Copy link
Member Author

AppVeyor is #22681. Timeout on Travis i686 (though not the usual one, but should not be related to this PR).

@ararslan ararslan merged commit 5271cd8 into JuliaLang:master Jul 5, 2017
@fredrikekre
Copy link
Member Author

Thanks.

@fredrikekre fredrikekre deleted the fe/doc-matrix-vector branch July 5, 2017 17:50
"""
Matrix{T}

Matrix type containing elements of type `T`. Alias for [`Array{T,2}`](@ref).
Copy link
Member

Choose a reason for hiding this comment

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

These descriptions of Vector, Matrix, AbstractVector, and AbstractMatrix seem a bit tautological ("[a Vector is a] Vector type containing elements of type T."). Perhaps something the lines of (for Vector) "[a Vector is a] one-dimensional dense array with elements of type T, often used to represent a mathematical vector." would be slightly more informative?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea that's better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants