Skip to content

Commit

Permalink
Generalize Vector in arg of constructor to AbstractArray, fixes #84
Browse files Browse the repository at this point in the history
  • Loading branch information
davidavdav committed Feb 18, 2020
1 parent a551526 commit 8791b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end

## vectors instead of tuples, with defaults (incl. no names or dimnames at all)
function NamedArray(array::AbstractArray{T,N},
names::Vector{VT}=[defaultnames(d) for d in size(array)],
names::AbstractArray{VT}=[defaultnames(d) for d in size(array)],
dimnames::Vector=[defaultdimname(i) for i in 1:ndims(array)]) where
{T,N,VT}
length(names) == length(dimnames) == N || error("Dimension mismatch")
Expand Down

0 comments on commit 8791b95

Please sign in to comment.