RecursiveArrayTools.jl
RecursiveArrayTools.jl copied to clipboard
Tools for easily handling objects like arrays of arrays and deeper nestings in scientific machine learning (SciML) and other applications
OrdinaryDiffEq.jl has an issue with ArrayPartitions constructed from nested arrays of StaticArrays. The following MWE ```julia using StaticArrays, StructArrays using RecursiveArrayTools using OrdinaryDiffEq u1 = StructArray{SVector{2, Float64}}(ntuple(x -> x *...
Hi, Thanks for the module, very nice. I was wondering if there's a way to convert an object of type VectorOfArray to Array when the size of the last dimension...
See https://github.com/SciML/RecursiveArrayTools.jl/pull/205 for details, which has the MWE that was found. There are two ways to do this. Either: ```julia @generated function ArrayInterfaceCore.ismutable(::Type{
I am using a `VectorOfArray` as state vector in `DifferentialEquations`. This leads to too many allocations. ```Julia using DifferentialEquations using RecursiveArrayTools # Set up the state vector U = VectorOfArray([zeros(100,100,100),...
As discussed in Slack. `DiffEqArray` is a convenient way to reduce Solution type and wrap `(u,t)` results, it seems reasonable to add optional `retcode` field to `DiffEqArray`. What do you...
``` julia> using RecursiveArrayTools julia> a = ArrayPartition([NaN]) ([NaN],) julia> any(isnan,a) false julia> any(isnan,a[:]) #dispatches on Base.any instead true ``` The responsible commit is years old, but I cannot see...
unless there's performance diff
https://github.com/JuliaNLSolvers/Optim.jl/pull/972 MWE ```julia using RecursiveArrayTools, LinearAlgebra u = ArrayPartition(rand(2), rand(1)) v = copy(u) H = u * v' # works mul!(H, u, v') # error ``` ```julia julia> mul!(H,u,v') ERROR:...
https://github.com/SciML/RecursiveArrayTools.jl/blob/569a07e9f0ecaacef167ee52e8101122a25c9b4a/test/partitions_test.jl#L78-L82 What's the use case for the vector space interface? using broadcast, rather than overloading `+,-` would be consistent with AbstractArray interface. ```julia julia> 2 + rand(2) ERROR: MethodError: no...