From f6334e7e969c082c7a5e9119a89e114d1a4bc3b1 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Wed, 19 Apr 2017 13:26:37 +0100 Subject: [PATCH] still need batchone --- src/dims/batching.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dims/batching.jl b/src/dims/batching.jl index a3ae6ed8..df7f81f6 100644 --- a/src/dims/batching.jl +++ b/src/dims/batching.jl @@ -27,3 +27,6 @@ end convertel(T::Type, xs::Batch) = eltype(eltype(xs)) isa T ? xs : Batch(map(x->convertel(T, x), xs)) + +batchone(x) = Batch((x,)) +batchone(x::Batch) = x