this should be a general util

This commit is contained in:
Mike J Innes 2017-05-01 13:45:24 +01:00
parent eae13c533f
commit d095c640c9

View File

@ -1,4 +1,4 @@
export Batch, batchone
export Batch, batchone, tobatch
struct Batch{T,S} <: AbstractVector{T}
data::CatMat{T,S}
@ -30,3 +30,6 @@ convertel(T::Type, xs::Batch) =
batchone(x) = Batch((x,))
batchone(x::Batch) = x
tobatch(xs::Batch) = rawbatch(xs)
tobatch(xs) = tobatch(batchone(xs))