Skip to content

Commit

Permalink
Allow permutedims(vector) to make row matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Ferris committed Nov 29, 2017
1 parent 57de662 commit b9a1a6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,8 @@ end

## Permute array dims ##

permutedims(v::AbstractVector) = reshape(v, (1, length(v)))

function permutedims(B::StridedArray, perm = (2,1))
dimsB = size(B)
ndimsB = length(dimsB)
Expand Down

0 comments on commit b9a1a6c

Please sign in to comment.