mxarray ctx

This commit is contained in:
Mike J Innes 2017-06-09 14:29:47 +01:00
parent 0f433137d0
commit 9b18fd639a

View File

@ -32,8 +32,8 @@ end
Base.copy(mx::MXArray) = copy!(Array{Float32}(size(mx)), mx) Base.copy(mx::MXArray) = copy!(Array{Float32}(size(mx)), mx)
function MXArray(xs::AbstractArray) function MXArray(xs::AbstractArray, ctx = mx.cpu())
mx = MXArray(size(xs)) mx = MXArray(size(xs), ctx)
copy!(mx, xs) copy!(mx, xs)
end end