Comments (2)
The underlying code in the package LWFBrook90.jl
simplifies to the following MWE:
using ComponentArrays # version: [b0b7db55] ComponentArrays v0.15.2
u0 = ComponentArray(
GWAT = (mm = 0.0, d18O = 0.0, d2H = 0.0),
INTS = (mm = 0.0, d18O = 0.0, d2H = 0.0),
INTR = (mm = 0.0, d18O = 0.0, d2H = 0.0),
accum = (cum_d_prec = 0.0, ))
reduce(vcat, [u0.GWAT.mm, u0.INTS.mm, u0.INTR.mm]) # works
reduce(vcat, [u0.GWAT.mm, u0.INTS.mm, u0.INTR.mm, u0.accum]) # doesn't work
giving the error:
julia> reduce(vcat, [u0.GWAT.mm, u0.INTS.mm, u0.INTR.mm, u0.accum]) # doesn't work
ERROR: MethodError: vcat(::Vector{Float64}, ::ComponentVector{Float64, SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, Tuple{Axis{(cum_d_prec = 1,)}}}) is ambiguous.
Candidates:
vcat(x::AbstractVector, y::ComponentVector)
@ ComponentArrays ~/.julia/packages/ComponentArrays/NnCVQ/src/array_interface.jl:37
vcat(X::Union{Number, AbstractVecOrMat{<:Number}}...)
@ SparseArrays ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1229
Possible fix, define
vcat(::AbstractVector{<:Number}, ::ComponentVector{<:Number})
Stacktrace:
[1] _mapreduce(f::typeof(identity), op::typeof(vcat), ::IndexLinear, A::Vector{Any})
@ Base ./reduce.jl:443
[2] _mapreduce_dim(f::Function, op::Function, ::Base._InitialValue, A::Vector{Any}, ::Colon)
@ Base ./reducedim.jl:365
[3] mapreduce
@ Base ./reducedim.jl:357 [inlined]
[4] reduce(op::Function, A::Vector{Any})
@ Base ./reducedim.jl:406
[5] top-level scope
@ REPL[8]:1
from componentarrays.jl.
the vcat
in v1.10 is breaking ReverseDiff too.
JuliaDiff/ReverseDiff.jl#242
from componentarrays.jl.
Related Issues (20)
- add missing LinearAlgebra methods on GPU
- Problem with `Zygote.hessian` HOT 1
- `lmul!` fails with Component Array on GPU
- Incorrect gradient type. HOT 2
- Scalar indexing on GPU when computing `Zygote.gradient` of `dot(x::CA, x::CA)`
- Method ambiguities reported by Aqua
- getting "Only homogeneous arrays are allowed" error for Vector{SVector} HOT 4
- How to get index range of subarray? HOT 3
- Extend KeepIndex to Vector indices HOT 1
- Nine broken tests for Test Summary: | Pass Broken Total Time Broadcasting | 30 9 39 7.2s HOT 1
- The ComponentArray type that can specify the properties of the ComponentArray object
- Indexing `ComponentMatrix` with `FlatAxis` components HOT 4
- `Diagonal(ComponentArray)` scalar indexing error HOT 1
- ComponentVectors are not stack-able HOT 10
- ComponentArray errors with `findall`
- Can't index component array with shaped components with subset of keys HOT 2
- FR: Preserve CA-ness when indexing component matrix with shaped components HOT 1
- Get rid of `ComponentMatrix` and higher-order `ComponentArray`s? HOT 12
- Missing reduced_index
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from componentarrays.jl.