still need batchone

This commit is contained in:
Mike J Innes 2017-04-19 13:26:37 +01:00
parent 5357b1e9f9
commit f6334e7e96

View File

@ -27,3 +27,6 @@ end
convertel(T::Type, xs::Batch) = convertel(T::Type, xs::Batch) =
eltype(eltype(xs)) isa T ? xs : eltype(eltype(xs)) isa T ? xs :
Batch(map(x->convertel(T, x), xs)) Batch(map(x->convertel(T, x), xs))
batchone(x) = Batch((x,))
batchone(x::Batch) = x