From 105e5e8bea99d1589da0fdcbc65d1425aed45b43 Mon Sep 17 00:00:00 2001 From: mohamed82008 Date: Sun, 16 Feb 2020 04:10:45 +1100 Subject: [PATCH] define eachcol for Julia 1.0 --- src/common.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.jl b/src/common.jl index 14f7fc5d..eee8518f 100644 --- a/src/common.jl +++ b/src/common.jl @@ -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...)