Skip to content

Commit

Permalink
define eachcol for Julia 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed82008 committed Feb 15, 2020
1 parent 988878a commit 105e5e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Generic ##

if VERSION < v"1.1"
eachcol(A::AbstractVecOrMat) = (view(A, :, i) for i in axes(A, 2))
end

Base.one(::Irrational) = true

function vcatmapreduce(f, args...)
Expand Down

0 comments on commit 105e5e8

Please sign in to comment.