Comments (3)
For some reason Base.Broadcast.combine_eltypes
returns Any
for your operands. Even dense:
julia> A = rand(ArbFloat, 2)
2-element Vector{ArbFloat}:
0.2154487845270057641299827610966
0.09626764182552727242704068481935
julia> B = rand(ArbFloat, 2)
2-element Vector{ArbFloat}:
0.6275663792273822768657185851517
0.06658759509104976444220998662436
julia> Base.Broadcast.combine_eltypes(+, (A, B))
Any
julia> @which Base.Broadcast.combine_eltypes(+, (A, B))
combine_eltypes(f, args::Tuple)
@ Base.Broadcast broadcast.jl:757
julia> Base.Broadcast.eltypes((A, B))
Tuple{ArbFloat, ArbFloat}
julia> Base.promote_typejoin_union(Base._return_type(+, ans))
Any
That last one is particularly suspicious to me, although I may be doing something wrong.
from sparsearrays.jl.
julia> Base.return_types(+, Tuple{ArbFloat, ArbFloat})
2-element Vector{Any}:
ArbFloat
Any
Yeah this seems to be some sort of type instability in addition of ArbFloat
s perhaps?
from sparsearrays.jl.
ArbFloat
is not concrete. You need to do spzeros(ArbFloat{128}, 2)
. While we don't specify that SparseMatrixCSC
eltypes be concrete, it's not something we really support.
In this case at least you would have to define +(x::ArbFloat, y::ArbFloat) = ...
rather than +(x::ArbFloat{P}, y::ArbFloat{P})
as is done now.
from sparsearrays.jl.
Related Issues (20)
- Elementwise multiplication by a view of a dense matrix gives a dense matrix
- `findmin(A; dims=1)` is much slower than manually looping over. HOT 1
- Sparse array of string types HOT 17
- Memory Mapped SparseArrays HOT 3
- Extra allocations when using generalized `mul!` operation
- Attempting to run sparse `qr` produces StackOverflow when run on a sparse matrix of `ForwardDiff.Dual`. HOT 6
- Inconsistent addition between sparse and dense HOT 1
- `ldiv` of `LUFactorization` can throw `SingluarException` HOT 1
- Thread-safe dropstored! HOT 1
- Merge SparseMatricesCSR.jl in HOT 2
- Support zero-based indices HOT 3
- Windows threading tests fail in GitHub Actions CI but pass in Buildkite CI
- Problem when running old benchmarks in Oceananigans HOT 6
- Sparse matrix format interfaces HOT 9
- Clarify Cholmod version incompatibility message at build time and run time HOT 8
- Row-wise and column-wise scaling of a sparse matrix runs out of memory HOT 1
- CHOLMOD default ordering options: METIS vs AMD HOT 28
- Add solver docs to the main SparseArrays docs
- Dividing sparse matrix by vector produces fill in HOT 2
- BLAS/LAPACK not being loaded for sparse matrix operations HOT 6
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 sparsearrays.jl.