Skip to content

Commit

Permalink
Add docstring example to VecOrMat (#38253)
Browse files Browse the repository at this point in the history
Co-authored-by: kimikage <kimikage.ceo@gmail.com>
  • Loading branch information
logankilpatrick and kimikage authored Apr 15, 2021
1 parent ed7b069 commit 29d5158
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,23 @@ Two-dimensional dense array with elements of type `T`, often used to represent
a mathematical matrix. Alias for [`Array{T,2}`](@ref).
"""
const Matrix{T} = Array{T,2}

"""
VecOrMat{T}
Union type of [`Vector{T}`](@ref) and [`Matrix{T}`](@ref).
Union type of [`Vector{T}`](@ref) and [`Matrix{T}`](@ref) which allows functions to accept either a Matrix or a Vector.
# Examples
```jldoctest
julia> Vector{Float64} <: VecOrMat{Float64}
true
julia> Matrix{Float64} <: VecOrMat{Float64}
true
julia> Array{Float64, 3} <: VecOrMat{Float64}
false
```
"""
const VecOrMat{T} = Union{Vector{T}, Matrix{T}}

Expand Down

2 comments on commit 29d5158

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.