julia> cu([1]) .= 1
1-element CuArray{Float32,1}:
 1.0
julia> transpose(cu([1])) .= 1
ERROR: scalar setindex! is disabled@MikeInnes @vchuravy You guys have been dabbling with broadcast recently, any idea?
I also want to get this working for subarrays, which require the following additional changes:
## Adapt.jl
+adapt(T, x::SubArray) = SubArray(adapt(T, parent(x), parentindices(x)))
## CuArrays.jl
+cudaconvert(x::SubArray{<:Any,<:Any,<:CuArray}) = SubArray(cudaconvert(parent(x), parentindices(x)))
+Base.cconvert(::Type{Ptr{T}}, V::SubArray{T,N,P,<:Tuple{Vararg{Base.RangeIndex}}}) where 
+             {T,N,P<:CuArray} =
+    Mem.view(buffer(V.parent), (Base.first_index(V) - 1) * sizeof(T))