Upstream
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先检查未勾选的 LinearAlgebra 和 SparseArrays 项,以及所引用的 Julia 上游 pull request。将它们与 src/dispatch.jl 和 src/MutableArithmetics.jl 中的变通方案进行比较。当剩余的上游假设得到处理,并且相应的变通方案可以简化或移除时,即可视为完成。
由索引模型根据 Issue 内容生成。
描述
Some implementations in Base/LinearAlgebra/SparseArrays have the following assumption:
zero(T) isa Tone(T) isa T-(::T) isa T+(::T, ::T) isa T*(::T, ::T) isa Tx * y = y * x- Implements
== *(x::T, y::S) = *(promote(x, y)...)
However, these assumptions are violated for the following types where MP stands for MultivariatePolynomials and MOI stand for MathOptInterface.
| Type | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
Bool |
x | x | ||||||
JuMP.VariableRef |
x | x | x | x | x | x | ||
MOI.VariableRef |
x | x | x | x | x | x | ||
MOI.ScalarAffineExpression |
x | x | x | |||||
MP.AbstractVariable |
x | x | x | x | x | |||
MP.AbstractMonomial |
x | x | x | x | ||||
MP.AbstractTerm |
x | |||||||
AbstractArray |
x | |||||||
Non-commutative MP.AbstractVariable |
x | x | x | x | x | x |
The current approach is to create an AbstractMutable type and redefine methods for the methods defined in Base for these types.
The long term solution would be to fix the issue upstream. In the short term, as Julia v1.5 might be an LTS, that would allow the package to be simplified once we drop Julia v1.0 for all the fixes that are merged before Julia v1.5.
The following are the issues in LinearAlgebra.
-
Matrix(::Tridiagonal),Matrix(::SymTridiagonal),Matrix(::LowerTriangular),Matrix(::UpperTriangular),Matrix(::UnitLowerTriangular),Matrix(::UnitUpperTriangular)assumes 1: https://github.com/JuliaLang/julia/pull/36256
Current workaround:
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/dispatch.jl#L231-L241 -
LinearAlgebra._iszeroassumes 7: https://github.com/JuliaLang/julia/pull/36194
Current workaround:
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/dispatch.jl#L267-L272 -
convert(::Type{<:UniformScaling}, ::UniformScaling)is not defined: https://github.com/JuliaLang/julia/pull/36193
Current workaround:
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/MutableArithmetics.jl#L60-L64 -
LinearAlgebra.diagm_containerassumes 1. : https://github.com/JuliaLang/julia/pull/35743
Current workaround:
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/dispatch.jl#L27-L31 -
-(::LinearAlgebra.Symmetric)assumes 3. : https://github.com/JuliaLang/julia/pull/32375/
Current workaround:
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/dispatch.jl#L204-L212 -
LinearAlgebra.luassumes 4. and 5. : https://github.com/JuliaLang/julia/pull/26344 -
*(::AbstractArray, ::AbstractArray)assumes 4. : https://github.com/JuliaLang/julia/pull/18218/
The following are the issues in SparseArrays.
-
*(::AbstractSparseArray, ::AbstractSparseArray)assumes 8.
Beginning of current workaround (many more follows):
https://github.com/JuliaOpt/MutableArithmetics.jl/blob/407a8fdfb5ef1810f3785a88e490291d37b9fb03/src/dispatch.jl#L105-L116
- 主要语言
- TeX
- 星标
- 55
- 派生
- 15
- 平均合并
- 19 小时 44 分钟
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jump-dev/MutableArithmetics.jl 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
jump-dev/MutableArithmetics.jl#353 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
jump-dev/MutableArithmetics.jl#293 · 8 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
jump-dev/MutableArithmetics.jl#292 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
jump-dev/MutableArithmetics.jl#287 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
jump-dev/MutableArithmetics.jl#253 · 7 条评论 ·
维护者通常 1 天内回复
查看 jump-dev/MutableArithmetics.jl 的全部 Issue
相似的 Issue
-
bug enhancement python
难度 2/5 1-3 小时 新手友好度 85/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#392 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
mobile-next/mobile-mcp#526 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
priority: low status: confirmed
难度 2/5 1-3 小时 新手友好度 72/100
melodic-software/claude-code-plugins#8799 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
wasi-gfx/wasi-gfx-runtime#152 ·