Vedant Puri

Results 87 comments of Vedant Puri

the case with sum works when I remove the kwarg `init`. but still curious why it wouldn't work otherwise

^yes that seems to be the only way forward. thanks

Currently im using this janky constructor: ```julia using Lux, ComponentArrays N = 128 # original ComponentArray u0 = ComponentArray(; vx=rand(N,10), vy=rand(N,10)) |> gpu # do stuff vxnew = CUDA.ones(N,10) vynew...

@jonniedie do you want me to create a PR for this constructor? Alternatively, is it possible to write a constructor that doesn't involve copying data

it would be good to define a `checkbounds(::ArrayPartition)` ```julia function Base.checkbounds(A::ArrayPartition, i, j...) @boundscheck checkbounds(A.x, i) b = A.x[i] @boundscheck checkbounds(b, j) end ``` though that still doesn't solve my...

i understand that ArrayPartitions are vectors and `A[i,j]` isn't the same as standard cartesian indexing. however in https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/transpose.jl#L181-L203, `A::ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}` is treated as an `AbstractVecOrMat` and is accessed like...

i don't see any. i meant to say "remove those functions unless there is a performance difference for for a particular use case".