Use of the `info` field in the `Smith` and `AbstractHermite` types over throwing errors?
还没有人认领这个 Issue。
评估
调研方向
Start from the Smith, RowHermite, and ColumnHermite type definitions and their show methods, then compare with LinearAlgebra.QR and LinearAlgebra.issuccess conventions. The proposal needs agreed bit meanings for info, changes wherever factorizations are constructed, and updated display behavior; it is also explicitly breaking. Done would mean documented semantics, tests for each failure bit, and a reviewed decision on the API change.
由索引模型根据 Issue 内容生成。
描述
Like other LinearAlgebra.Factorization types, the Smith, RowHermite, and ColumnHermite types have an info::LinearAlgebra.BlasInt field that is zero when the factorization is a success. This could be used to convey to a user why a factorization failed without throwing an exception. This is what factorization types in the linear algebra standard library do (for instance, LinearAlgebra.QR).
I don't know the details of how this value is intended to be interpreted, but I do think that we can use this value to convey information about why a factorization failed. For this, we'd need some standards, and my idea is to set each bit of info to indicate something about the factorization failure:
- The first bit should be 1 if the Smith/Hermite normal form matrix does not take the expected form (diagonal for SNF, trapezoidal for HNF).
- The second bit should be 1 if the left unimodular factor is not unimodular.
- The third bit should be 1 if the right unimodular factor is not unimodular.
This information can be exploited by the show(::IO, ::MIME"text/plain", ::T) method to explain to a user why a factorization failed in interactive use. My issue is that users writing non-interactive code would have to manually check for successful factorizations with LinearAlgebra.issuccess. Of course, this would be a breaking change if implemented.
- 主要语言
- Julia
- 星标
- 6
- 派生
- 3
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
brainandforce/NormalForms.jl 的其他 Issue
-
tagbot-manual
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 4/5 3-5 天 新手友好度 32/100
-
难度 5/5 一周以上 新手友好度 12/100
brainandforce/NormalForms.jl#17 · 1 条评论 ·
-
good first issue help wanted
难度 4/5 3-5 天 新手友好度 22/100
brainandforce/NormalForms.jl#16 · 1 条评论 ·
查看 brainandforce/NormalForms.jl 的全部 Issue
相似的 Issue
-
The entrypoint deletes its manifest runfiles tree at exit even under TEST_TMPDIR可能已有人在做 @TrapsterDK 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
periareon/rules_julia#64 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
JuliaAI/MLJTransforms.jl#108 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
JuliaBayes/Wren.jl#370 · 3 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
JuliaGPU/GemmKernels.jl#232 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100